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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 15:17:51
Script start
Timing: Jan 18 2025 15:17:51
Module start 'layout'
Timing: Jan 18 2025 15:17:51
Module start 'content'
Timing: Jan 18 2025 15:17:52
Module end 'content'
Timing: Jan 18 2025 15:17:52
Script end

Main resources:

Total runtime0.8196 sec
Peak memory usage4,096.0000 KB
Database Queries81

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.0234152.6250
Module start 'layout' 0.00520.0021 741.648439.4453
Module start 'content' 0.00740.8109 781.0938723.4063
Module end 'content' 0.81830.0013 1,504.500020.1797
Script end 0.8195  1,524.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3858160.0002
Check MTime0.00120.1479160.0001
Mysql Total
Database connection0.00070.082810.0007
Mysqli_queries0.754392.0286810.0093
Looping result0.00060.0716790.0000
Template Total0.790196.420.3951
Template load0.00220.273120.0011
Template processing0.787896.127120.3939
Template load and register function0.00010.010610.0001
states
state_id_array0.00080.098810.0008
state_identifier_array0.00140.171320.0007
Override
Cache load0.00200.2394540.0000
Sytem overhead
Fetch class attribute can translate value0.00040.054950.0001
Fetch class attribute name0.00100.1162120.0001
XML
Image XML parsing0.00160.200550.0003
class_abstraction
Instantiating content class attribute0.00000.0022130.0000
General
dbfile0.00190.2291300.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs