Two or more language, only one design folder

Author Message

Domenico Garozzo

Tuesday 19 July 2011 3:50:38 am

Hi,

my site etnaworldtrade.domenicogarozzo.it have 3 languages.

The default siteaccess language is italian, then there are other two languages, english etnaworldtrade.domenicogarozzo.it/en and russian etnaworldtrade.domenicogarozzo.it/ru.

The language for each siteaccess (en and ru) is setted.

The only problem is that i want associate the "italian" design folder (same template, same override) to others. This is possible?

Thank you,
Domenico

Nicolas Lescure

Tuesday 19 July 2011 4:14:13 am

Yes you can :)

The design config is in settings/siteaccess/yoursiteaccess/site.ini.append.php :

 [DesignSettings]
SiteDesign=youritaliandesign
AdditionalSiteDesignList[]=base

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
SiteLanguageList[]=eng-GB
TextTranslation=enabled

Domenico Garozzo

Tuesday 19 July 2011 6:04:07 am

Hi Nicolas,

my settings/siteaccess/en/site.ini.append.php is so but the results is that not load override:

[SiteAccessSettings]
RequireUserLogin=false
RelatedSiteAccessList[]=en
RelatedSiteAccessList[]=backend
ShowHiddenNodes=false

[DesignSettings]
SiteDesign=plain_site
AdditionalSiteDesignList[]=base

[RegionalSettings]
Locale=eng-US
ContentObjectLocale=eng-US
SiteLanguageList[]=eng-US
SiteLanguageList[]=ita-IT
SiteLanguageList[]=rus-RU
TextTranslation=enabled

[FileSettings]
VarDir=var/en

[ContentSettings]
TranslationList=ita-IT;rus-RU

Nicolas Lescure

Tuesday 19 July 2011 6:25:57 am

Are you sure "plain_site" is your design ?

Domenico Garozzo

Tuesday 19 July 2011 6:51:27 am

This is the configuration on my site.ini in the italian siteaccess:

[SiteAccessSettings]
RequireUserLogin=false
RelatedSiteAccessList[]=it
RelatedSiteAccessList[]=backend
ShowHiddenNodes=false

[DesignSettings]
SiteDesign=plain_site
AdditionalSiteDesignList[]=base

[RegionalSettings]
Locale=ita-IT
ContentObjectLocale=ita-IT
SiteLanguageList[]=ita-IT
SiteLanguageList[]=eng-US
SiteLanguageList[]=rus-RU
TextTranslation=enabled

[FileSettings]
VarDir=var/plain_site

Domenico Garozzo

Wednesday 20 July 2011 12:36:22 am

Nobody can help me?

Daniel A. Øien

Wednesday 20 July 2011 9:45:34 am

Make sure you also have the following in settings/override/site.ini.append.php (the global override file) 

[SiteAccessSettings]
AvailableSiteAccessList[]=it
AvailableSiteAccessList[]=en
AvailableSiteAccessList[]=rus
AvailableSiteAccessList[]=backend

Also doublecheck your settings/siteaccess folder names, because you seem to be using inconsistent naming (three letters for Russian, two letters for English and Italian).

If the siteaccesses named in the ini files don't match the folder names, they won't be applied. The standard siteaccess folders created when you add a language in eZ use three letters, such as "ita", "eng", and "rus".

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

Domenico Garozzo

Wednesday 20 July 2011 1:54:54 pm

Hi Daniel,
this is my settings/override/site.ini.append.php :

[SiteSettings]
DefaultAccess=it
SiteList[]
SiteList[]=it
SiteList[]=en
SiteList[]=ru

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=it
AvailableSiteAccessList[]=en
AvailableSiteAccessList[]=ru
AvailableSiteAccessList[]=backend
MatchOrder=uri
HostMatchMapItems[]
ForceVirtualHost=true

[DesignSettings]
DesignLocationCache=enabled

I use for all languages two letter (it|en|ru) and i have create this folder on my settings/siteaccess/ + (it|en|ru).

The language is configured because if you go on etnaworldtrade.domenicogarozzo.it/en or etnaworldtrade.domenicogarozzo.it/ru the default template have the correct language.

The problem is that don't load override.ini file and so don't load .tpl file.

Daniel A. Øien

Thursday 21 July 2011 12:09:32 am

It looks correctly set up, but it's kind of hard to debug fragments of configuration files.

This may be a silly question, but have you cleared the INI caches completely? One way to be sure no cache issues is causing problems is to run php bin/php/ezcache.php --clear-all --purge from the root eZ Publish directory.

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

Tomislav Buljević

Thursday 21 July 2011 2:50:17 am

What about the design.ini.append.php? Did you put that file in your siteaccesses?

Domenico Garozzo

Thursday 21 July 2011 3:06:25 am

It's a cache problem.

I have deleted all cache and the layout goes right!

Now the problem is that when i clear the cache by backend command (empty all cache button), the cache for en and ru siteaccess are not clear.

Why?

Daniel A. Øien

Thursday 21 July 2011 3:36:45 am

I think it's because your RelatedSiteAccessList settings might be off.

Check this page:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteAccessSettings/RelatedSiteAccessList

That means, for your Italian site.ini.append.php, you should have:

[SiteAccessSettings]
RelatedSiteAccessList[]=en
RelatedSiteAccessList[]=ru
RelatedSiteAccessList[]=backend

For your English one:

[SiteAccessSettings]
RelatedSiteAccessList[]=it
RelatedSiteAccessList[]=ru
RelatedSiteAccessList[]=backend

For your Russian one:

[SiteAccessSettings]
RelatedSiteAccessList[]=it
RelatedSiteAccessList[]=en
RelatedSiteAccessList[]=backend

For your backend one:

[SiteAccessSettings]
RelatedSiteAccessList[]=it
RelatedSiteAccessList[]=en
RelatedSiteAccessList[]=ru

This setting controls, among other things, what other siteaccesses' view caches should be cleared when a particular siteaccess' cache is cleared.

If the above doesn't work, I'm afraid you'll have to take a look at other cache and cache-block settings.

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

Domenico Garozzo

Thursday 21 July 2011 4:01:13 am

Hi Daniel,

the it, en, ru configuration are ok.

I have added the RelatedSiteAccessList to the backend site.ini

Thank you.

---------------

Sorry but isn't change nothing. I empty cache but only in it siteaccess take effect.

Daniel A. Øien

Thursday 21 July 2011 4:50:42 am

Oh, ok. If they're all using the same database, use the same VarDir in ALL siteaccesses.

Looks like you only need to update the ones for English and Russian:

[FileSettings]
VarDir=var/plain_site

Then just remove the var/en and var/ru directories (you can safely do this if you haven't uploaded any original files or images to these siteaccesses).

After this, you can also remove all the RelatedSiteAccessList[] settings discussed above. They're only needed if you use different databases for different siteaccesses.

Also, read more here:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/FileSettings/VarDir

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

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 00:53:23
Script start
Timing: Jan 18 2025 00:53:23
Module start 'layout'
Timing: Jan 18 2025 00:53:23
Module start 'content'
Timing: Jan 18 2025 00:53:24
Module end 'content'
Timing: Jan 18 2025 00:53:24
Script end

Main resources:

Total runtime1.0036 sec
Peak memory usage4,096.0000 KB
Database Queries97

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.0469152.6406
Module start 'layout' 0.00550.0027 740.687539.4844
Module start 'content' 0.00820.9939 780.1719784.7188
Module end 'content' 1.00200.0016 1,564.890632.1250
Script end 1.0036  1,597.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3210160.0002
Check MTime0.00130.1274160.0001
Mysql Total
Database connection0.00080.075410.0008
Mysqli_queries0.883087.9805970.0091
Looping result0.00090.0901950.0000
Template Total0.968596.520.4843
Template load0.00200.202420.0010
Template processing0.966596.300420.4833
Template load and register function0.00020.017910.0002
states
state_id_array0.00160.160310.0016
state_identifier_array0.00220.218620.0011
Override
Cache load0.00200.19761120.0000
Sytem overhead
Fetch class attribute can translate value0.00060.059340.0001
Fetch class attribute name0.00150.1529180.0001
XML
Image XML parsing0.00990.983240.0025
class_abstraction
Instantiating content class attribute0.00010.0064280.0000
General
dbfile0.01101.0956340.0003
String conversion0.00000.000940.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
14content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
14content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
26content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/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: 72
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs