Create Translation and Compile Language
Creating Translation on Language
In the previous chapterchapter, we have seen how to create the gettext language files in .po files. Now we are going to make translations for the language files.
Here we are going to maketranslate translationthe of ArabaicArabic ( ar ) language file for the WAP control panel. The language file is located on /usr/local/eenos/wap/locale/ar/LC_MESSAGES/django.po
Understating the Gettext Language file
The language file havehas two terms,
- msgid
stringis in the originallanguage ,language, don't - msgstr
msgid ,msgid, you need to add the translation here.
After making the full translation ,translation, we need to compile the .po language files into binary file .mo fles.files. To compile the language files use the following command,
To compile WAP translations run the following command.
/usr/local/eenos/scripts/translate --compile --wap
To compile RAPP translations run the following command,
/usr/local/eenos/scripts/translate --compile --rapp
To compile UAPP translations run the following command:
/usr/local/eenos/scripts/translate --compile --uapp
Warning :Warning: Compiling a language filesfile may rewrite the existing .mo files.