CodeIgniter Forums

Full Version: Creating a multilingual website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I'm having some problems in creating a multilingual website. I have all of my language files ready in separate folders inside the application/language folder. For every bit of text on the webiste, I'm doing
echo lang('general_welcome_message');

So now I want to give users the option to change language and store that in a cookie.

Any ideas on how I should go about doing that?


El Forum

$this->config->set_item('language', 'your_language_here');
before you load any language files. You can fetch that value from a cookie if you want, or from the session.