I've searched a lot and found even more topics on CI's multilanguage URLs. But most of the answers have no longer working links to CI wiki or doesn't explain a bit of what I want.
My default is a non English language, but I want controllers and methods named in English. I also don't want language segment appear in my URL (at least not for default language).
Eg.:
- Default uri - example.com/blogas/irasas/123
- English uri - example.com/blog/item/123 or example.com/en/blog/item/123
Links in both languages should call Blog::item()
Generating uris should be similar - site_url('blog/item/123');
should result a link in user language:
- Default - example.com/blogas/irasas/123
- English - example.com/blog/item/123 or example.com/en/blog/item/123
User language should be set in a cookie or session preferably.
Is there any way to achieve this?
Using latest CI 2.2.0
I believe this solution for 2.1 should work, but I can't figure out how URI's should be translated (where to put translations) and how to remove language part from URI.