• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
switching default lang in config.php

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:

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:
$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 Wink

The user guide probably has your answer:

eheheheh thanks slow Wink

but i didn't find any answer to my question Sad
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 Tongue

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.

yes slowgary thanks for suggest.....

i've found this $this->config->config['language'] = $language_i_want;

i think this could be the solution Wink

really thanks Wink

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.