*************************************************************************************************** * * * a2billing 1.X (c) AGPL 2003-2012 * * Documentation * * * * Title: Localization tips * * Date: April 2012 * * Version: 1.X * * Author: AB * * * *************************************************************************************************** Key Terms 1. MO => Machine Object File 2. PO => Portable Object File Contents 1. Generation of the Portable Objects Files. 2. Generation of Machine Object Files. 3. Merging the PO Files 4. PO Files to translate 5. Contribute 1. Generation of the Portable Objects Files you can generate the po file with the help of xgettext utility. > xgettext -n --no-wrap *.php if you want xgettext to traverse the child directories and search for ".inc", ".tpl" and ".php" files. > find -follow | grep -i [.][pit][hnp][pcl]$ | grep -v "admin.*" | grep -v "agent.*" | xargs xgettext -n --no-wrap customer UI : cd customer rm -rf templates_c/* find -follow | grep -i [.][pit][hnp][pcl]$ | grep -v "admin.*" | grep -v "agent.*" | xargs xgettext -n --no-wrap admin UI : cd admin rm -rf templates_c/* find -follow | grep -i [.][pit][hnp][pcl]$ | grep -v "customer.*" | grep -v "agent.*" | xargs xgettext -n --no-wrap agent UI : cd agent rm -rf templates_c/* find -follow | grep -i [.][pit][hnp][pcl]$ | grep -v "admin.*" | grep -v "customer.*" | xargs xgettext -n --no-wrap this will get all the gettext entries from the all php file and generate a po file. 2. Generation of Machine Object Files you can convert your po file when it is translated, to the mo file. mo file is the binary file. > msgfmt messages.po this will generate a mo file. 3. Merging the PO Files you can merge your po files if you have changed your text in the files and regenerate a po file. > msgmerge --no-wrap old_messages.po messages.po --output-file=new.po this will generate a mo file. 4. PO Files to Translate A2Billing is composed of 3 web interfaces : Admin, Agent and Customer. Therefore each of them have a PO file Admin : https://github.com/Star2Billing/a2billing/tree/master/common/admin_ui_locale Agent UI : https://github.com/Star2Billing/a2billing/tree/master/common/agent_ui_locale Customer UI : https://github.com/Star2Billing/a2billing/tree/master/common/cust_ui_locale 5. Contribute There is different ways to contribute on translations : - Corrections : You can review the existing PO files in your own languages - New Languages : You can download the english PO files (lang code en_US) and start new translation into your own language Once you made a contribution you can send it over to the A2Billing Team at info@star2billing.com