Open Source Training Seminar FreePBX Paid Support

Module i18n

Modules can include their own string translations via gettext.

Create the .po file to be translated:

  • cd admin/modules/modulename
  • find *.php common/*.php | xargs xgettext -C -o modulename.po --keyword=_ -

This will create a modulename.po file, which will contain all of the strings to be translated.

After translating the file, compile it into a .mo:

  • msgfmt -v modulename.po -o modulename.mo

Add the .mo & .po to an i18n directory (in the module dir)

  • mkdir i18n
  • add language_country/LC_MESSAGES directories: mkdir/en_US/LC_MESSAGES/
  • put he .mo & .po files in the LC_MESSAGES dir.

FreePBX will automatically use these translations for your modules. It is very important that the filename of the .mo file be the same as modulename.

See also: I18n

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads