I'd like to maintain my native language translation for a CodeIgniter-based application.
However, translation files are in app_lang.php file as content of the array, and I'd like to use 'standard' gettext tools 开发者_如何学编程to translate which are also easier to maintain, keep under DVCS etc.
Do you know about some application which would enable to convert from/to CodeIgniter language files to/from gettext *.po files?
All I know is the following blueprint at Launchpad: https://blueprints.launchpad.net/phsite/+spec/gnu-gettext-translations
The multi-platform tool Poedit allows you to perform customisable searches on your code and generate a .po file from the results. It's a bit buggy on OS X and I haven't tried it with CI language files, but have used it on custom internationalization code and it worked perfectly.
You will need to edit the rules to use $this->CI->lang->line
or $lang
but it should work after a little tweaking.
精彩评论