Forums / Install & configuration / locale in url

locale in url

Author Message

Dan Mansfield

Wednesday 25 March 2009 9:44:02 am

I'm developing a multi-locale and multi-language site and want to achieve the locale in the url.
e.g. domain.com/en-GB to display the english siteaccess in english language. or domain.com/fr-CH to display the swiss home page in french.

Is it possible? Or would I need to setup siteaccesses for each url permutation and manually put in the default language for each one?

Gaetano Giunta

Wednesday 25 March 2009 10:06:21 am

using separate siteaccesses is definitely the fastest way to go - all your content and templates automatically get translated into the correct language.

You can do a multilingual site in one siteaccess but you will have to deal with a huge lot of custom templates and template operators (eg ezurl variants etc)

You can set up siteaccesses to be triggered by the first part of the url after the domain though, so you should be able to obtain exactly what you want

Principal Consultant International Business
Member of the Community Project Board

Dan Mansfield

Wednesday 25 March 2009 10:33:20 am

On the ez.no site is the language designator after the / in the url a different site access then?
i.e.
ez.no/fr
ez.no/de
being different siteaccesses

Dan Mansfield

Friday 27 March 2009 5:27:39 am

maybe I;m not understanding this.
I have a .com domain and a .eu domain.
depending on which you visit you see the com siteaccess or the eu siteaccess.
The eu siteaccess might be translated into 5 languages so how would that work in practice?
How would I go into the eu site and change between french and english for example?
I'm currently doing domain matching to change the site access can I combine domain and url matching to change the siteaccess??
TIA

Łukasz Serwatka

Friday 27 March 2009 6:45:56 am

I'm currently doing domain matching to change the site access can I combine domain and url matching to change the siteaccess??

This is not possible with eZ Publish at the moment I'm afraid. Combined host and uri is something what we plan to add in future. However you can send me massage and I can give you a patch.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Dan Mansfield

Friday 27 March 2009 6:52:55 am

ok so my final question is it possible to change the displayed language by any other means?
e.g. via cookie?

Łukasz Serwatka

Friday 27 March 2009 6:58:06 am

It is possible to use view parameter called language. Example: http://ww.example.com/(language)/fre-FR

But following this approach content object has to exist in that language. Also you will need to take care about passing that variable in URL IIRC.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Lazaro Ferreira

Wednesday 22 April 2009 9:14:43 am

Hi Łukasz,

We need to setup an ezpublish instance that will be shared by several sites using different domains, each site will be multilingual , therefore a combined host and uri access will be needed

Is it possible to get a copy of the patch you have mentioned above ?

Regards

Lazaro
http://www.mzbusiness.com

Andy Caiger

Monday 28 December 2009 6:32:19 am

We want to set up a multilingual website with different siteaccesses, such as:

ez.no/en

ez.no/fr

ez.no/de

but we also want to have the same URLs after the siteaccess part e.g.

ez.no/en/About-Us

ez.no/fr/About-Us

ez.no/de/About-Us

How can we do that? Is there a setting somewhere that turns off multilingual URL aliases (just show the URL alias for the main language?)

ez.no/fr
ez.no/de

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com