Soluling home   Document home

Definitions

Definitions

A definition is a collection of fields that define the structure of a record of a structured file. Such a file contains one or more records. Each record contains one or more fields that may contain data to be localized. A definition can be used for all file formats that contain tables like structure where each row contains a record and each column a field of the record. The following table contains file types where definitions are used:

File type Description Actions when a definition is used
Text A text file that contains structural data. Import, glossary, localize
Binary A binary file that contains optinal header section following one or more data records. Import, glossary, localize
Excel An Excel sheet that contains data in a table. Import, glossary, localize
CSV A CSV file that contains data in a table. Import, glossary
Database A database that contains data to be imported or used as a glossary. Import, glossary

Definitions are used when localizing the above files, when importing data from the above files and databases, and when using the above files or database as a glossary. Database and CSV definitions are only used when importing data or using data as a glossary. When localizing a database, selections are used.

A definition specifies the structure of a record. The file is expected to contain one or more records that all use the same format. When Soluling reads the file, it uses the definition to read a record one by one until the end of the file or database is found. Soluling can not read structured data that uses a variable record format. In such cases, you have to convert your proprietary file into a standardized file format such as XML or JSON.

Fields

Each field has a type. Possible values are:

Value Description
Text The item contains the text to be localized.
Ignore The item is ignored.
Context The item contains the context value that is used to identify this record.
Comment The item contains a comment value for the first text column before or after the comment.

Lets have some example. We have a text following file:

id1<tab>value1<cr><lf>
id2<tab>value2<cr><lf> ... idN<tab>valueN

The file contains one record in each line. Each record contains two field: id and value. These fields are separated by tab character. The record is ended with carriage return + line feed character or file end. The definition of the file contains two fields: context+text. This definition is suitable for localization of the above text file.

Another sample is an Excel file that contains three columns: English, German, and Japanese. The definition of the file contain three fields: text(English)+text(German)+text(Japanese). This definition is suitable for importing the file.

Definitions for the binary file can also contain an optional header definition. It can also contain the following field types:

File type Description
Record count The field contains an integer value that specifies the record count in the file.
String length The field contains an integer value that specifies the string length in characters.
String size The field contains an integer value that specifies the string length in bytes.

The glossary definitions can also contain the following field types:

File type Description
Entry id  
Subject  
Term id  
Language  
Description  
Part of speech  
Grammatical gender  
Term location  
Term type