Welcome Guest, Not a member yet? Register   Sign In
Language Change
#1

[eluser]mDonchev[/eluser]
Hi Guys,

I have trouble changing languages in a CI project.

At the constructor function of each controler I have this:
Code:
// Loading the language file
switch($this->session->userdata('language')) {
    case "bg": $this->lang->load('texts', 'bulgarian'); break;
    case "en": $this->lang->load('texts', 'english');  break;
}

But no matter the language session variable its still loading the default language file set in the config file.

If I have the names of the language files (texts_bg and texts_en) its working fine.
But I want to keep the filenames equal in each language.

Please tell me where I go wrong and what to do to fix it.

Thanks
Martin
#2

[eluser]llbbl[/eluser]
are your view files utf8?
#3

[eluser]mDonchev[/eluser]
Yes, they are.

Why ?

Martin




Theme © iAndrew 2016 - Forum software by © MyBB