Multilingual website gestion |
[eluser]dorwin[/eluser]
Hi, (For the record I'm french and beginner with CI so please excuse me and if you answer, could you please use easy words ? ) So, I'm on a multilingual website. I found this post : http://ellislab.com/forums/viewthread/101790/P0/ very helpfull so, There im my route config : Code: $route['(en|fr)/(:any)'] = "$2/$1"; and there is a few code (wich is working (i think)) : [algo] if language is in URL (ex : site.com/en) -> loading of the lang file (here "en") else -> check navigator lang ->if navigator lang = fr or en -> redirect (rewrite the url) with $lang else ->redirect with "en" as lang Code : Code: //---CHECK LANG-----// I just developped it and i know it's optimisable, but : the question is, have I to put this code on every constructor of every controller ? I know i can put this on a function but the problem is the same, I have to call it on every constuctor ? First, is there a place I can put this code just one time and, Is my code (optimized or not) the good solution for multilingue website ? Thanks ! |
Messages In This Thread |
Multilingual website gestion - by El Forum - 01-10-2010, 07:09 PM
Multilingual website gestion - by El Forum - 01-11-2010, 01:04 AM
Multilingual website gestion - by El Forum - 01-11-2010, 11:27 AM
Multilingual website gestion - by El Forum - 01-11-2010, 01:49 PM
|