...
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 |
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 |
Shell |
---|
-o <old_translation> - The file or directory structure containing the old language pack translated in the desired language. |
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). |
/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 |
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 |
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 1: Edit the file where the problem was reported and reported and search for the //NOT-TRANSLATED text. In our example, the file detected with keys not translated is located at language/es-ES/api/soap/common.php
.
Warning |
---|
Not all keys marked with //NOT-TRANSLATED can or should be translated! |
...
Note | ||
---|---|---|
| ||
Your translation files are in our example located in: /usr/local/voipnow/bin/langutils/translation/diff_253_300_es or in /usr/local/voipnow/bin/langutils/translation/253es . The files containing translation errors are located in: /usr/local/voipnow/bin/langutils/translation/language/ |
STEP 2: Translate all the keys that you missed. You can translate the lines marked with //NOT-TRANSLATED in the folder where the errors were reported (in our example /usr/local/voipnow/bin/langutils/translation/language/
). After having all these lines translated, you must replace the existing language folder with the folder containing the files with all the keys in order. To do so, please type:
/es-ES
Shell |
---|
cp -r /usr/local/voipnow/bin/langutils/translation/language/es-ES/ /usr/local/voipnow/bin/langutils/translation/diff_253_300_es |
lpmerge.php
script script as described in How to Do It again again to verify your translation. For the lines that must not be translated or for those words that have the same spelling as in English, lpmerge.php
will exit with error. If you are confident that all the keys that can be translated are in order, use the lpmerge.php
script with -f
(force) in order to generate the language archive. Example: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 -f |
...
STEP 2: Translate all the marked keys that you missed from all the reported files. You can translate the lines marked with //NEW-KEY in the folder where the errors were reported (in our example /usr/local/voipnow/bin/langutils/translation/language/es-ES/).
After having all the missing lines translated, you must replace the folder containing the differences with the repaired one. To do so, please type:
Shell |
---|
cp -r /usr/local/voipnow/bin/langutils/translation/language/es-ES/ /usr/local/voipnow/bin/langutils/translation/diff_253_300_es |
lpvalidatepack.php
script script as described in in How to Do ItError: There are PHP errors in your translation files
...
STEP 2: After fixing the error, run the lpmerge.php
script script as described in in How to Do It:
Shell |
---|
php /usr/local/voipnow/bin/langutils/lpmerge.php php \ |
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.