config language and the i18n-wiki tutorial |
[eluser]tobben[/eluser]
Concerning the Wiki-post: i18n-wiki post Anyone figured out a way to swap language settings in the config file, depending on the language set in the i18n script? So, if I swap language to "no" (norwegian), the language set is also switched - so I could get me some nice norwegian day names on ex. the calendar. Sincerly yours, tobben
[eluser]tobben[/eluser]
Update: I added this to the controller construct: Code: if($this->uri->segment(1) == 'no') So if the URI is: http://localhost:8888/en/kalender/dato/2007/12 - show english language files http://localhost:8888/no/kalender/dato/2007/12 - show norwegian language files It works, but its probably a lame way to change this system language. Suggestions to make it work globaly on all scripts?
[eluser]Rick Jolly[/eluser]
As an alternative to hooks, you could put it in the constructor of a custom parent controller and extend it. You might find the parent controller handy for other things as well.
[eluser]wemago[/eluser]
you should see how language is set at the mini application by Peccavio. They did a really good job. |
Welcome Guest, Not a member yet? Register Sign In |