Welcome Guest, Not a member yet? Register   Sign In
Translating URI segments for mulit-language website
#1

[eluser]bertcarremans[/eluser]
Hi,

I created a website which supports English and German. The language chosen by the user is stored in a session, which then allows to get the correct language file.

However, I would like to have the URI segments translated to improve the user experience.

So when the user chooses English the URI's would be

www.example.com/products/bread
www.example.com/products/butter
www.example.com/products/milk

but when the user chooses German they would be

www.example.com/produkte/bread
www.example.com/produkte/butter
www.example.com/produkte/milch

Does this mean that I have to duplicate all my English controllers and functions in German? Or is there any other way?

Thanks!
#2

[eluser]hykoh[/eluser]
Hi there,

i've the same problem currently.

Did you find a solution for that ???

#3

[eluser]CroNiX[/eluser]
Try routes...
$route['produkte/(:any)'] = 'product/$1';

I believe this way would also let you use umlauts.
#4

[eluser]hykoh[/eluser]
ya routes are configured correctly .. but is there any easier way to declare the segments multilanguage ? for site_url() for example




Theme © iAndrew 2016 - Forum software by © MyBB