Translations
Introduction
KCML 7.13 introduced a way for KCML to look up translations at run-time rather than applying all translations to the src code. It relies on .lang file format used in Drive and Autoline. There are two parts to this process - building an index file from all .lang files top enable fast lookups and then modifications to KCML to enable automatic searching of these files.Creating the index files
The index files are created using the command
kcml --generate-translationsNormally the path will be the top-level directory of the CVS tree containing the translations - KCML will follow the CVS tree and find all the files. Alternatively for testing a single .lang file can be named.
This command generates a subdirectory called translation containing a set of index files one per translated language. If the environment variable KCML_TRANSLATION_PATH is specified then this path is used or otherwise it is created in the current directory.
In operation
The environment variable KCML_TRANSLATION_PATH should be defiuned to enable kcml to find the index files. That is all the configuration that is needed
When an application is executed KCML will apply translations at run-time for each chevron string or text based property in a DEF FORM. Using the index file it will atttempt to fin d a translation for the nglish string that matches the context and failing that to find the best translation disregarding the context. Pre-computed hashes are used for fast lookup.
XML
applyTranslations