Text File Dictionaries

 

RC-WinTrans supports the use of text files (.txt) as dictionaries where the format of the content follows a set of given rules, namely: the first line is used to specify the dictionary's languages and the subsequent lines contain the dictionary data (see figure below).

 

 

Restrictions

 

·

Restriction 1:

Multi-line texts will not be added to a text dictionary.  Multi-line texts contain a new line control character used (for example) in .NET Forms software.  Using a TMX file dictionary (.tmx) or an SDL Trados translation memory (.sdltm) is recommended when your software contains text with new line control characters.

 

·

Restriction 2:

When using this dictionary type it is not possible to save a description with an entry.  Support for adding and saving a comment to a dictionary entry is provided by the TM Workbench and is available for TMX dictionaries and SDL Trados TMs.

 

 

Formatting

The first line of the text file must contain a tab-separated list of the languages used in the file.  The languages are coded according to ISO-639.  You may either use the short two-letter form, e.g., "en," or a combination of language and country code, e.g., "en-us."

 

Each subsequent line in the file holds a tab-separated list of dictionary items.  The language order must be in the same order as in the first line (languages specification) of the file.

 

Each entry in the file must be written in quotation marks.  This is meant to enhance the software to also work with text files that only use the tab character.

 

Figure: The first six lines of a sample text dictionary combining two languages.  The languages are specified in the first line: "en-uk" for English (UK) and "fr" for French.

"en-uk"              "fr"
"Abort"              "Abandonner"
"About"              "À propos de"
"About..."           "À propos de..."
"Absolute Position"  "Position absolue"
"Accelerator"        "Raccourci"

 

 

Language Pairs

The languages do not need to be stored in any particular order- RC-WinTrans only verifies the existence of a desired language pair in a text dictionary before using it.

 

 

Saving Data to a Text File

When saving or exporting translations to a text file, the translations will be appended to the file. However, if RC-WinTrans finds that the file already contains a line with exactly the same combination of texts, that translation will not be saved.  This is done to avoid double entries.

 

NOTE:  Multi-line texts cannot be added to this dictionary type.

 

 

Editing and Maintaining a Text File Dictionary

To edit the contents of a text file dictionary, open it with the TM Workbench.  Do this by selecting the Open with TM Workbench toolbar button (shown right) in the Dictionaries view. Next use the appropriate commands from the TM Workbench's Maintenance menu.

 

 

Technical Requirements

Text files that are to be used as dictionaries in RC-WinTrans need to match the following technical conditions:

·

The file must be encoded either as ANSI or Unicode UTF-16-LE.

·

Each entry must be set in quotation marks ("...").  If an item contains quotation marks itself, each single quotation mark of the original text must appear as two consecutive quotation marks in the text file.

 

 

See also: "Dictionaries (Overview)";

"Dictionaries (Overview)" topic: "Creating a New Dictionary";

"Import from Text File";

"Export to Text File";

"Import/Export (Overview)".