Currently i have a language loaded inside MY_Controller which extends CI_Controller. But inside a special page which controller (let’s call it ABC controller) extends MY_Controller, I need to override the loaded language with another language. I tried loading another language inside this ABC controller, but unsuccessful. Is there a way to unload the loaded language and load another language?
Currently i have a language loaded inside MY_Controller which extends CI_Controller. But inside a
Share
Have you tried just loading the language file you need?It should be then accessible just like your default language. I haven’t tested this tho, but from my understanding this should be the way to go about it.Reference: http://codeigniter.com/user_guide/libraries/language.html
REVISED
I ended up digging a bit more for you, and found that you CANNOT load a default language (define it as default in your controller) and then later try to change it to something else.
Follow these steps:
constructorusing something like session array / user selection.Reference here per forum posts: http://codeigniter.com/forums/viewthread/176223/