Two languages for one siteaccess -> SOLVED

Author Message

Robert Dude

Monday 15 November 2010 1:03:16 am

Hi all,
I am developing a website wich will have two language, but each language will have differents content. For that, I created two folder in the root of the admin, one for french and one for english, and I set the language of each folder.
For the moment, the operator i18n don't check the language of the object, I tested a translation in the folder template and it's only on french, the default language of the siteaccess.
Wich solution can I use? I am desperate...
Thank you.
Bob

Gaetano Giunta

Monday 15 November 2010 1:16:23 am

Any reason for not creating separate siteaccesses? Note that you can create two siteaccesses even if you have two separate content subtrees.

Principal Consultant International Business
Member of the Community Project Board

Robert Dude

Monday 15 November 2010 1:25:34 am

Hi !

Thank you for this speedy response, impressive!

"Note that you can create two siteaccesses even if you have two separate content subtrees."

OMG is it possible!? With the SiteAccess MatchOrder Host? Like www.mydomain.com/fr for SiteAccess fr / fr folder subtree and www.mydomain.com/nl for SiteAccess en / en folder subtree?

What is this magic solution? Thank you very much.

Gaetano Giunta

Monday 15 November 2010 3:33:28 am

I am not a grand wizard in SiteAccess config, but you could try until you get it working (or hope someone else chimes in in this thread):

- the easy route: create a new vhost: fr.mydomain.com

- the other way: use MatchOrder=uri;host

NB: other settings you might play with can make the '/nl' '/fr' disappear from your urls and breadcrumbs, so that each siteaccess looks like there is only its own content subtree. There are a few of them: PathPrefix, IndexPage, DefaultPage are the ones off the top of my head in site.ini.

Principal Consultant International Business
Member of the Community Project Board

Robert Dude

Tuesday 16 November 2010 1:25:52 am

Thank you.

"create a new vhost: fr.mydomain.com" I don't want that for SEO purpose.

"use MatchOrder=uri;host" I tested that without result. I will test again and tell you if it works.

I realy believed that have siteaccess for subtree wasn't possible...

Thank you again.

Bob

Robert Dude

Tuesday 16 November 2010 5:28:53 am

Thank you very much Gaetano, I resolved the problem with:

In settings/override/site.ini.append

MatchOrder=host_uri
HostUriMatchMapItems[]=admin.mysite.com;;ezflow_site_admin
HostUriMatchMapItems[]=www.mysite.com;fr;fre
HostUriMatchMapItems[]=www.mysite.com;en;eng

In settings/siteaccess/fre

IndexPage=/content/view/full/111/ # the node id of the folder fr
RootNodeDepth=2

Same in settings/siteaccess/eng with the node id of the folder en

THANK YOU !!!

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 04:28:43
Script start
Timing: Jan 18 2025 04:28:43
Module start 'layout'
Timing: Jan 18 2025 04:28:43
Module start 'content'
Timing: Jan 18 2025 04:28:44
Module end 'content'
Timing: Jan 18 2025 04:28:44
Script end

Main resources:

Total runtime0.9757 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 589.1641152.6406
Module start 'layout' 0.00860.0035 741.804739.4844
Module start 'content' 0.01210.9623 781.2891567.8438
Module end 'content' 0.97450.0012 1,349.132816.1250
Script end 0.9757  1,365.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3494160.0002
Check MTime0.00150.1497160.0001
Mysql Total
Database connection0.00070.068610.0007
Mysqli_queries0.918694.1511660.0139
Looping result0.00060.0566640.0000
Template Total0.940896.420.4704
Template load0.00180.186320.0009
Template processing0.938996.232220.4695
Template load and register function0.00010.012010.0001
states
state_id_array0.00090.094110.0009
state_identifier_array0.00140.146720.0007
Override
Cache load0.00160.1600430.0000
Sytem overhead
Fetch class attribute can translate value0.00050.049420.0002
Fetch class attribute name0.00080.084470.0001
XML
Image XML parsing0.00050.049220.0002
class_abstraction
Instantiating content class attribute0.00000.001480.0000
General
dbfile0.00080.0821160.0001
String conversion0.00000.001140.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs