To translate a program to your native language you need to edit the file program.lng.
This file is divided into sections:
- Info section - it looks like this:
[Info]
Lang Name=English
Lang Code=1033
Base Language=
Font Face=Tahoma
Charset=1
Size=8
RTL reading order=0
Help name=english.chm
Author=Ixen Gerthannes
Version=1.26
Field | Description |
Lang name | the name of your language. |
Lang code | the language ID of your language. |
Base language | the name of the other language file that will be used if there are some missing strings in your file. You would probably put here 'english.lng'. |
Font Face | Name of the font that will be used to display dialog boxes. The standard font for dialog boxes is 'Tahoma' - change it when the standard font does not properly display the text in your language. |
Charset | charset code of the font you are using |
Size | Point size of the font |
RTL reading order | specifies if the language should be read in right-to-left (some Arabic languages) order or left-to right (most of the European languages). |
Author | the name of the person that has translated this file |
Version | version of this translation file - it should be the version of program for which the file has been prepared. |
- Menus, dialog boxes and string table - all of them are in the form of:
[135]
32774=Time critical
32775=Highest
32776=Above normal
32777=Normal
32778=Below normal
The number in square brackets contains the identifier of the main resource. The '[0]' section is the one that contains the string table. The strings are in the form 'id=text'. The id is either control id (in the dialog boxes) or menu item id (in menus) or the string id (in the string table).
When translating the menus make sure:
- that you change the ampersands chars ('&') in the way that in the each menu there are not the same two combinations of ampersand and the letter forward to it. (ie. the shouldn't be '&Exit' and 'Chang&e' strings in one menu because the '&' sign precedes two times the 'e' letter.
When translating the dialog boxes make sure:
- that you leave the spaces ' ' one the beginning and at the end of a string if there were any in the source translation. They are needed by the program to properly display some things.
When translating the string table make sure:
- that you do not change the order of the formatting strings (they begins with the '%' sign - ie. %s, %lu, ...) nor delete them. It could cause the program to work unstable or to crash.
- that you leave the space characters at the beginning and at the end of the line if there are any (just liku in dialog boxes).
- that you properly modify the strings - there are some character pairs that has a special meaning (they are translated before showing the text in program) - '\t' is translated to a tab, '\r' to a carriage-return and '\n' to new-line.
And do not forget to change the file program.lng to something like arabic.lng or russian.lng so anybody would know what language it is.