DSL dictionary structure

Lingvo

DSL dictionary structure

The source dictionary text must be a plain text file. The dictionary text may be typed either in UNICODE or in ANSI encoding.

A DSL dictionary is a sequence of dictionary entries. An entry (card) comprises a heading (a word or a phrase) and card body. If a dictionary is attached to the Lingvo system, all card headings are displayed in the overall Word List, while card body (together with its heading) is displayed in a card. The body contains a translation and/or comment. NB! This comment, or explanatory notion, is information (for example, about the history of the word) destined for the dictionary user, and should not be confused with comment in the source dictionary text (serving for, say, debugging purposes).

As the new version supports dictionaries not only in Russian and English, but also in Italian, French, German etc. (see the full list of supported languages in Supported languages section), the correct functioning of your dsl-dictionary requires the special heading at the beginning of dsl-file. This heading includes dictionary name (#NAME "dictionary name"), source language(#INDEX_LANGUAGE  "language name") and target language (#CONTENTS_LANGUAGE  "language name").

Ex.: Write the following heading at the beginning of the text file to create the English-Russian dictionary named "General":

#NAME "General"
#INDEX_LANGUAGE "English"
#CONTENTS_LANGUAGE "Russian"

Note:

  1. If the dictionary text was typed in ANSI encoding, you must specify the codepage for the source text, i.e. add a codepage tag after tags for target language and source language tags:

    #SOURCE_CODE_PAGE    "codepage name".

    Allowed codepage names:

    Allowed codepage name Windows codepage number
    Latin 1252
    Cyrillic 1251
    EasternEuropean 1250
  2. In case you save the dictionary text in ANSI encoding, you should remember that the dictionary source language and target language must be supported by the same codepage. If there is no such codepage, you must save the dictionary in UNICODE encoding.  
  3. In case you save the dictionary text in UNICODE encoding, you don't have to specify the codepage.

 

Structure of dictionary entry (card)
How to compile the dsl-dictionary