Forums / Setup & design / problem generating urls for multilingual
Alexandre Cunha
Tuesday 25 July 2006 11:34:18 am
I have setup a multilingual site.Have siteaccess settings configured, like this
site.com/index.php/en site.com/index.php/pt site.com/index.php/nl
Works fine.
Have build a menu to choose the language.Each link for this menu, haves:
href={"/en"|ezurl}> href={"/pt"|ezurl}> href={"/nl"|ezurl}>
Buts this unfortunettly generates links with duplicate siteaccess, like this:
site.com/index.php/en/pt site.com/index.php/en/nl ...
How to replace the siteaaccess from the url ?
Thanks for your help
http://AlexandreCunha.com
Marcin Drozd
Tuesday 25 July 2006 2:07:49 pm
Hi U can use: href={"index.php/en/"|ezroot}> or betterhref={concat("index.php/en/",$uri_string)|ezroot}>
http://ez-publish.pl
Tuesday 25 July 2006 2:59:38 pm
Hi Marcin
Thanks for your valuable help.
href={"index.php/en/"|ezroot}> or better href={concat("index.php/en/",$uri_string)|ezroot}>
This works perfect!
However, my developement machine the url needs "index.php" but the production site needs "index.php?". I need a more universal solution including for servers not needing the "index.php".
There is another sugestion without hardcode "index.php" or "index.php?" ?
Looking in the documentation, dont have found nothing about $uri_string.Where I can find more nfo about this var and other uri/url related vars ?
Kristof Coomans
Wednesday 26 July 2006 1:24:57 am
Hello Alexandra
Take a look at http://ez.no/community/forum/setup_design/available_languages_for_objects_in_3_8#msg99898 and http://ez.no/community/forum/setup_design/how_to_select_language/
I would go for the INI solution. It's the most flexible if you ever have to change your setup.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org