Language Translations
There is code in Control to be able to translate various words phrases. However, the translation table has to be manually entered and compiled.
The Files
All translation files are stored in the $CCDIR/lang_ts folder. There are two types of files:
- .ts files - Human readable text file. The "source code"
- .qm files - Machine readable binary file. This is the file that the programs actually use.
Using the Translations
To use the translation files, simply set the CCLANG environment variable to the name of the .qm file. Do not use the directory name. Eg.
For US translations, set CCLANG to english_us.qm
Editing the Translation Table
To edit the translation table,
- Go to the lang_ts folder
> cd $CCDIR/lang_ts/
- Open the appropriate .ts file with a text editor. Eg:
> vi my_translations.ts
On the line immediately after the last </message> tag, insert
<message> <source>the_original_phrase</source> <translation>the_translated_phrase</translation> </message>The text inside the <source> tag MUST be lower case.
- Convert the .ts file into a .qm file
> $CCDIR/std/qtx11-3.3.5b/bin/lrelease my_translations.ts
- Test to ensure that it works
