[Contents] [Intro] [Reference] [Tutorial] [Questions [New [Index]
Overview -> Reference -> Internationalization

daVinci Internationalization

The user-interface of daVinci can be configured for all languages with character sets, that can be displayed by Tcl/Tk 8.0.3 (obviously you'll get problems with the dialog layouts for languages not written from left to right). All text elements of the user-interface are defined in so called language files and the current language can be choosen with the environment variable DAVINCI_LANG.

The internationalization mechanism can even be used by applications. Please refer to the API documentation for further details.

Position and naming of language files

The regular location for all language files is the directory $DAVINCIHOME/lib/daVinci. If daVinci is started, it first searches for its language file in the current working directory and than in the above default location. So if somebody wants to define own languages or overwrite the language files contained in the distribution, this can be done by placing the new files in one of these two locations. daVinci will not come up, if it can't find at least a correct language file for the default language C in one of both directories. See below, to find out which conditions a correct language file has to fulfill.

All names of the language files look like daVinci_C.lang. They can be splitted into three parts, where the first one (daVinci_) and the last one (.lang) are fixed and the second one is the name of the language (C in the above case). This second component is the value, which you have to set in $DAVINCI_LANG to choose the language-file. You can get german language by setting $DAVINCI_LANG to de, which will choose the language-file daVinci_de.lang.

Syntax and layout of language files

The language-files have a very easy syntax. On each line of the file two strings separated by whitespace have to be specified. Where the first string is the language-key and the second string is the language-value. Example:
  File.New      "New File"
  File.New.mne  "0"
Please enclose the language-value in '"', although it is only necessary, if it contains whitespace characters.

The language-keys are hard coded in daVinci, therefore each language-file must contain an exact number of keys and exactly the keys specified in daVinci. See below for further preconditions.

Some keys with special endings need values of a special type, whereas all others can have an arbitrary string as their value. For keys ending with .mne the value has to be an integer, specifying the position of the character that should be underlined in a menu and used as a mnemonic. A value of "-1" represents no mnemonic. The keys ending with .mod should only have values Control, Meta, Alt, Shift or "" for no modifier and they define the modifier for the keyboard binding. The accelerator for the keyboard binding is defined by language-keys ending with .acc and the values should contain a single character. Please remember, that accelerators should be mutually exclusive for the complete system and mnemonics should be mutually exclusive for each menu.

It is recommended to copy the default language-file daVinci_C.lang and edit each language-value to define a new language.

Preconditions for language files

Every language-file is checked against the default language file. This means, that although another language has been chosen by setting $DAVINCI_LANG, the default language file must be available. Each language-file has to contain a key Version specifying the same version number as the daVinci binary expects. Additionally each language file has to contain an exact number of keys, coded in the daVinci binary. This means, that there has to be a value for each language-key used in daVinci. The keys of each language-file have to be the same keys defined in the default-language file.

As described above it is recommended to just copy the default-language file and change every value. The default language file shouldn't be changed at all.


daVinci V2.1.1 Online Documentation - Page update: Oct 21, 1998