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

[eluser]Mahn[/eluser]
Hello,

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
Code:
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?

Thanks!

El Forum

[eluser]WanWizard[/eluser]
Code:
$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.