Skip to main content

Create Translation and Compile Language

Creating Translation on Language

In the previous chapter 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 make translation of Arabaic ( 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 have two terms,

  • msgid : This  string in the original language , don't  change it.
  • msgstr : This  is the translation  of the msgid , you need to add the translation here.

After making the full translation , we need to compile the .po language files into binary  file  .mo fles. 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 :  Compiling a language files may rewrite the existing  .mo files.