eZ Community » Forums » Install & configuration » locale in url
expandshrink

locale in url

locale in url

Wednesday 25 March 2009 5:44:02 pm - 8 replies

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?

Modified on Wednesday 25 March 2009 6:17:29 pm by Dan Mansfield

Wednesday 25 March 2009 6:06:21 pm

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

Wednesday 25 March 2009 6:33:20 pm

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

Friday 27 March 2009 1:27:39 pm

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

Friday 27 March 2009 2:45:56 pm

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.

Modified on Friday 27 March 2009 2:47:54 pm by Łukasz Serwatka

Friday 27 March 2009 2:52:55 pm

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

Friday 27 March 2009 2:58:06 pm

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.

Modified on Friday 27 March 2009 3:00:06 pm by Łukasz Serwatka

Wednesday 22 April 2009 6:14:43 pm

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

Monday 28 December 2009 3:32:19 pm

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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from