Node:Internationalization, Next:, Previous:Key bindings, Up:Top



Internationalization or localization

Bad news is that the kort binary is not entirely self-contained. It should contain no static strings that are to be displayed to user. Instead static strings are fetched from a file whose name depends on locale. Please refer to man locale for more information. Name of such files is constructed in the following way: first is selected a directory name, currently statically compiled in to program, found from file static_strings.c about line 23, where there reads

#define LANGUAGE_FILE_PREFIX "/opt/lib/kort/"
after this directory name a string "strings_" is appended, after which is appended the current locale name. Current locale name is either value of enviroment value "LANG", if undefined then value of "LC_CTYPE", if undefined then value of "LC_ALL" and if undefined then "en_UK". So if there is no locale defined at all, name of that file will be
/opt/lib/kort/strings_en_UK
and that file just must be present for kort. Format of said files is that in each row there is a word, then a whitespace and after that something, terminated by a endline, after which a new word begins. This is interpreted in such a manner that the first word in a row is an identifier for a string. The string follows. For every locale the same identifiers with possibly different line endings should be present. If end user sees error messages saying "problem in init-string" this is not the case. Some strings contain formatting directives like %s that actually are interpreted by printf(3) function call and there should always be same number and flavour of these formatting directives for each strings, if you decide to copy this kind of file to a different name and try translating the stringies. There are two special strings in the file, namely the ones with identifiers str_one_letter_for_yes and str_one_letter_for_no that are interpreted when user is given a "yes or no" -type question ; first characters in given strings are accepted as answer for such questions, preferably they will be different characters.

End user may receive error messages that originate from TCL interpreter or database and language of these messages then depends on something else, please refer to TCL and MySQL documentation.