Translations for parts of the frontend must be handled via Module translations.

Translations for the core system and the setup process are handled with .po and .mo files.

Although the .po file can be edited manually, contributors are highly advised to generate this files automatically. This can be done in three steps with the command line.

cd setup
find . -iname "*.php" -o -iname "*.html" -o -iname "*.xml" -o -iname "*.tpl" > ./locale/potfiles.txt
xgettext --from-code=utf-8 --keyword=i18n --output=./locale/setup.pot --files-from=./locale/potfiles.txt
cd setup
find . -iname "*.php" -o -iname "*.html" -o -iname "*.xml" -o -iname "*.tpl" > ./plugins/*pluginname*/potfiles.txt
xgettext --from-code=utf-8 --keyword=i18n --output=./plugins/*pluginname*/locale/setup.pot --files-from=./plugins/*pluginname*/locale/potfiles.txt



cd contenido/
find . ../data/config -path "./plugins" -prune ! -type d -o -path "./jar" -prune ! -type d -o -path "./external/codemirror" -prune ! -type d -o -iname "*.php" -o -iname "*.html" -o -iname "*.xml" > ../data/locale/potfiles.txt
xgettext --from-code=utf-8 --keyword=i18n --output=../data/locale/contenido.pot --files-from=../data/locale/potfiles.txt

These files generate two files: potfiles.txt and contenido.pot. Both files must be updated in the version control. With the .pot file the language catalog of each languages .po file can be refreshed and translated. This can be done with the programm "PoEdit". By saving the .po file in "PoEdit" the .mo file of the language is automatically being generated. Both files must be updated in version control.


Running the script

On an windows environment it is necessary to install cygwin with the xgettext plugin. You are able to install the plugin while the cygwin installation routine. 

Please use the 64-Bit version of cygwin to run this script because xgettext won´t work in the 32-Bit version out of inexplicable reasons.