KnowledgeTree Internationalisation (i18n) ----------------------------------------- KnowledgeTree 3 beta 1 contains many non-internationalised texts, for example within templates. We would appreciate input on how best to approach internationalisation within templates. Please use the KnowledgeTree forums at http://forum.ktdms.com/ to discuss internationalisation. Testing ------- - install gettext command line utilities - run xgettext to generate .po files eg. Neil quite likes: $ find . -type f | xgettext --no-wrap -d knowledgeTree -L PHP -s -f - -o i18n/knowledgeTree.po Michael was using: xgettext --files-from=i18n/file-list -LPHP --keyword=_ --no-wrap --msgid-bugs-address="kt-i18n@jamwarehouse.com" -o knowledgeTree.po - write a test translation by editing the po file appropriately. if you have problems with the order of parameters, because your language's ordering is different then in english. You can use the $ to change order eg: msgid "Upgrading item %d of %d" msgstr "... %2$d ... %1$d ..." - construct the right directory structure inside i18n eg. $ mkdir -p i18n/es/LC_MESSAGES/ - upgrade the existing .po files in each translation using: $ mv knowledgeTree.po old.po $ msgmerge --no-wrap old.po ../knowledgeTree.po --output-file=knowledgeTree.po $ rm old.po - use msgfmt to compile your translated .po file to a .mo $ msgfmt --check $knowldgeTree.po --output-file=i18n/$es/LC_MESSAGES/knowledgeTree.mo - change $default->defaultLanguage in config/environment.php and verify your translation. $Id$