Language selection problem |
[eluser]tomcode[/eluser]
I use Code: $this->config->set_item('language', $my_language); to set the app's language before loading any language files. I usually set it in MY_Controller, a hook would do the job, too. A solution for international sites used to be : I18n on the Wiki Personally I use a solution very close to i18n, I do not override the helper functions and have some other tweaks Watch out when loading files using Code: $this->load->lang('filename', $language); For complex projects with loads of entries : - I organise my language idents like URI's, using a point as segment separator - I use conventions like adding _fmt to an ident when it used with sprintf() - I override CI's lang->line() method to have it return the identifier when the entry is not found, very nice for debugging and allows to worry for translations later : Code: /** |
Messages In This Thread |
Language selection problem - by El Forum - 12-17-2010, 10:08 AM
Language selection problem - by El Forum - 12-17-2010, 10:22 AM
Language selection problem - by El Forum - 12-17-2010, 11:03 AM
Language selection problem - by El Forum - 12-18-2010, 01:41 AM
Language selection problem - by El Forum - 12-18-2010, 08:10 AM
Language selection problem - by El Forum - 12-20-2010, 02:16 AM
|