switching default lang in config.php |
[eluser]Ngulo[/eluser]
hi all, i'm wondering how to switch language in my site... I've some different language packs in my /language directory. this is the scheme: Code: -language now i would like to switch the default language into config.php ($config['language']) by a session data that i use to set like this: Code: $param = $this->uri->segment(3); so where i can retrieve session->userdata('site_lang'); and put my new session site language for all helpers ,libraries and so on... ?? thanks guys
[eluser]slowgary[/eluser]
The user guide probably has your answer: http://ellislab.com/codeigniter/user-gui...guage.html
[eluser]Ngulo[/eluser]
eheheheh thanks slow but i didn't find any answer to my question I know i can load my personal_lang.php file where i want , but ....for example....if i'm using the form_validation class , form's error messages are taked by the default $lang['language'] directory....if this is true......if i want to switch this directory ,not only for my personal_lang.php file,but also for any libraries i'm using in my controllers,what i've to do? hope you understand my bad english
[eluser]slowgary[/eluser]
I don't really have any experience working with multi-language sites, but I searched the forums for "form validation language" and there are plenty of posts that seem to deal with this same issue. You should check them out.
[eluser]Ngulo[/eluser]
yes slowgary thanks for suggest..... i've found this $this->config->config['language'] = $language_i_want; i think this could be the solution really thanks |
Welcome Guest, Not a member yet? Register Sign In |