Owen Christian and myself have cooked up a nice little code igniter language file translator. This is a controller and series of views that you can drop in on your CI install and then use a nice front end to manage administration of the language files for your application.
This is meant for people to be able to edit the standard application language files in your CI install, which work with the CI Language Class. The basic idea is that you have a master language, and then this allows translators to translate into other languages.
- UTF8 support
- Handles php in language strings
- Synchronises language keys with ‘master’ language
- Checks php for syntax errors
- Unpack archive
tar -zxvf translator-0.5.tgz
- Copy files into appropriate location in your CI install (or just unpack archive over your install)
- If your language files are in an exotic location, edit config/translator.php
- set language files to be writable by your webserver
- that’s it!
- (If you haven’t already) Create your master language files and keys e.g.:
$lang['file1_some_key'] = 'some key'; $lang['file2_another_key'] = 'another key';etc.
- Create corresponding ‘slave’ language files e.g.:
NB You don’t have to create the keys, just the empty writable files
- Make sure language files are webserver writable
- Fire up your new controller i.e. index.php/translator and go!