Change autoloaded languages? |
[eluser]ev0c[/eluser]
Hi, i'm using CIs Language class / helper for providing a multilanguage website. Everything works fine when i load the language files i need in every controller. But i have some lang files i don't want to load every time because they should be avaiable globally. Therfore i autoloaded (autoload.php) these. I thought because Code: $this->->config->set_item('language', $lang); Am i doing something wrong?
[eluser]InsiteFX[/eluser]
You need to copy the language files that you need from system/language then modify them for the language that you need. Then place them in application/language/language_name application/ english german french etc. InsiteFX
[eluser]ev0c[/eluser]
Yes i did this. Maybe i should write my question a little different: The autoload.php loads one of my language files globally (but in the default language, defined in the config). When changing this default language in the controller it has no effect on the autoloaded language file. How can i change this since i want to autoload that again in the specific language (without writing it explicit in the controller every time).
[eluser]InsiteFX[/eluser]
You would need to use a CodeIgniter hook, the best way to see how to do this is do download like PyroCMS and see how they are doing it. InsiteFX
[eluser]ev0c[/eluser]
Okay thanks. I looked into it but it was not exactly what i was looking for. I found this thread: http://ellislab.com/forums/viewthread/64118/#339962 That solved my problem. Thanks
[eluser]adityamenon[/eluser]
Why are you having a username that only has one meaning? I'm not offended, it's just funny
[eluser]ev0c[/eluser]
=D ... trust me that was not my intention. I actually never heard of it and while thinking of a username it just randomly came to my mind. I changed it. xD |
Welcome Guest, Not a member yet? Register Sign In |