Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated using 4PSA automated script

...

STEP 1: Copy the translated structure to your working directory.

Shell

cd /usr/local/voipnow/bin/langutils/translation

cp -r /usr/local/voipnow/bin/langutils/translation/language_diff_folder/language/en /usr/local/voipnow/bin/langutils/translation/diff_oldVersion_newVersion_languageCode

STEP 2: Run the lpmerge.php script using the following command:
Shell
php /usr/local/voipnow/bin/langutils/lpmerge.php -o <old_translation> -n <new_translation> -r <reference_lp> -f
where:
Shell
-o <old_translation> - The file or directory structure containing the old language pack translated in the desired language.

-n <new_translation> - The file or directory structure containing the differences between the old and the new language packs, translated in the desired language.
-r <reference_lp> - The file or the directory structure containing the language pack for the reference version, usually the latest version available for English.
-f - This flag is optional and should be used to skip checking for untranslated keys.
An interactive menu will ask you for supplementary information:
Shell

The ISO language code of the language chosen for translation.

The name of the translated language.

The VoipNow version the translation was made for (e.g. 3.0.0).

For our example , assuming that the folder containing the differences was copied to /usr/local/voipnow/bin/langutils/translation and it is named diff_253_300_es, the following commands must be run:
Shell

cd /usr/local/voipnow/bin/langutils/translation

/usr/local/httpsa/php53/php/php /usr/local/voipnow/bin/langutils/lpmerge.php -o /usr/local/voipnow/bin/langutils/translation/253es -n /usr/local/voipnow/bin/langutils/translation/diff_253_300_es -r /usr/local/voipnow/bin/langutils/translation/en

The following messages will be displayed in the console:
Shell

Please enter the ISO language code you want to create the language pack for (eg: en): es-ES

Please enter the language name for es-ES (e.g. English): Spanish

For which 4PSA VoipNow version is this language pack (e.g. 3.0.0): 3.0.0

STEP 3: When there are no PHP errors and untranslated keys, a confirmation message is displayed and you can use the generated archive to upload it to your web interface.
Shell

The validation process has ended successfully.

You can take the tar archive from /usr/local/voipnow/bin/langutils/translation/voipnow300_Spanish.tar.gz. Congratulations!

STEP 4 (optional): If errors occurred in the generation process of the language pack, you must address them according to the below section.

...

STEP 2: After fixing the error, run the lpmerge.php script as described in How to Do It:

Shell
php /usr/local/voipnow/bin/langutils/lpmerge.php \
-o /usr/local/voipnow/bin/langutils/translation/253es \
-n /usr/local/voipnow/bin/langutils/translation/diff_253_300_es \
-r /usr/local/voipnow/bin/langutils/translation/en

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.