Multi Lingual
Another top feature I wanted to add is the ability for the script to be completely multi lingual. Lucky for me CodeIgniter makes this super easy with their language library. All I had to do was create a new language file (kb_lang.php) and place it in the system/language/english/ folder. Next open the autoload file and add:
$autoload['language'] = array('kb');
Now my language file is auto loaded and anywhere I need a string of text I use:
echo $this->lang->line('kb_hello');
The only downside is it is a lot more coding than just writing “Hello” but in the end it is worth the extra time to add features like this and it keeps you from having to edit the template files just to change the wording.
October 30, 2007
0 comments
Kick things off by filling out the form below.
Leave a Comment