Jo-Philipp Wich edited this page Jan 15, 2016 · 2 revisions


Translations are saved in a folder po within each individual LuCI component directory, e.g. applications/luci-app-firewall/po/. You find the reference in po/templates/package.pot. The actual translation files can be found at po/lang/package.po .

In order to use the commands below you need to have the gettext utilities (msgcat, msgfmt, msgmerge) installed on your system.

Rebuild po files

If you want to rebuild the translations after you made changes to a package this is an easy way:

 ./build/i18n-scan.pl applications/luci-app-example \
     > applications/luci-app-example/po/templates/example.pot

Note: The translation catalog for the base system covers multiple components, use the following commands to update it:


Convert a single .po file to a .lmo file

In order to quickly convert a .po file to LMO format for testing on the target system use the po2lmo utility shipped with the luci-base module:

 $ cd modules/luci-base/src/
 $ make po2lmo
 cc -c -o po2lmo.o po2lmo.c
 cc -c -o template_lmo.o template_lmo.c
 cc -o po2lmo po2lmo.o template_lmo.o
 $ ./po2lmo
 Usage: ./po2lmo input.po output.lmo