CodeIgniter Forums

Full Version: languages: how to
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]sl3dg3hamm3r[/eluser]
Hi there

I already pulled up two different projects with CI, both including options for different languages. Up to this time, I used to store the language in a cookie, not indicating it in any way in the URI. In terms of SEO, this is quite bad since the URI looks all the same no mather what language is chosen.

I'd like to change that. My idea is to put the language always directly right after the controller into the first URI-segment. I would also add my own link-helper which takes care of this.
Technically I'm not sure how to implement it right. Should I work with _remap(), popping the language (the first URI-segment) from the URI and pass it then further to the right controller-method? Or how else could I possibly solve that?

Thx for any thoughts!
sl3dg3

El Forum

[eluser]saidai jagan[/eluser]
it is good to store the user language in the session or db

El Forum

[eluser]sl3dg3hamm3r[/eluser]
Sure - it doesn't change the inherent shortcomings regarding search engines. Only one language will be indexed.

El Forum

[eluser]n0xie[/eluser]
Look here or here

El Forum

[eluser]sl3dg3hamm3r[/eluser]
Brilliant, thanx!