Page tree
Skip to end of metadata
Go to start of metadata

Localization File Tips

The Localization file is a property file. It contains 'key=value' pairs, where the key is a field name, and value is the translated field name value.  The Localization file is encoded in ASCII, using Unicode escapes for all characters that are not part of the ASCII character set. In order to allow it to be edited in any program that supports UTF-8 it should be converted to UTF-8 using Java utility native2ascii.

Example

native2ascii -reverse -encoding UTF-8 GUI2_fr.properties GUI2_fr.properties.UTF

If you want to correct a particular field name, label or phrase, but you can't find it in the file, you can get an English translation file, search it for your phrase and note the property key. Search for the property key in the localization file to find the phrase you need to correct.

Most files contain many properties with duplicate names. We have a special script called collapse_stringlist.pl to simplify the translation procedure for duplicates.

In Agiloft, the base (English) file for internal program strings is called GUI2.properties. Let's say, for example, you wish to translate this into the Latin language using a UTF-8 text editor. After obtaining the base file from Agiloft, prepare it for translation using the command:

collapse_stringlist.pl -v GUI2.properties > AL-latin.txt

 

After translating all of the strings in AL-latin.txt using your text editor, run the following command to import the translation:

collapse_stringlist.pl -v -i GUI2.properties AL-latin.txt > GUI2_la.properties

Now you can add the file GUI2_la.properties to Agiloft and select the Latin language from the GUI.

If, after the original translation, you upgrade to a different version of Agiloft, obtain the list of new strings to translate using the command:

collapse_stringlist.pl -v GUI2.properties AL-latin.txt > AL-latin-2.txt

After translating the strings in AL-latin-2.txt, import using the command:

collapse_stringlist.pl -v -i GUI2.properties AL-latin.txt AL-latin-2.txt > GUI2_la.properties

Windows-1252 Encoding

If, instead of UTF-8, you wish to use an older text editor that only understands Windows-1252 encoding, you might export using the command:

collapse_stringlist.pl -v -l cp1252 GUI2.properties > AL-latin.txt

Then, after editing, import using the command:

collapse_stringlist.pl -v -i -l cp1252 GUI2.properties AL-latin.txt > GUI2_la.properties

Unicode Encoding

If the translated file is in the UTF-8 encoding, which most of customers send to us, it is easy to convert it to unicode format before uploading by Java utility native2ascii. For example: 

native2ascii -encoding utf8 SpanishUTF8.txt Spanish.txt

 

Partial translation

If you created a knowledgebase-specific localization file - for example, French.txt with checked "Hide fields that have already been translated" - and you want to replace parts that haven't yet been translated by already translated parts automatically, we have a special script to do it.

Input parameters and Output:

Translation file A

English translation file for KB 1

Translation file B

Foreign language translation file for KB 1

Translation file C

Foreign language translation file for KB 2.

Note: It may be partially translated already, but it contains some strings that have not been translated.

Standard Output:

Foreign language translation file for KB 2. a New_translated_file to standard output

Example

translation_merge.py KB1_english_file.txt KB1_french_file.txt KB2_french_file > New_translated_french_file

Related articles

CONTENTS
  • No labels