Languages system

Author Message

C B

Thursday 22 April 2010 6:22:52 am

Hello World ;)I'm french and just would like to know if I can get a different structure of my site according to languages.Exemple 1 :no > Velkommen - Bilder - Videoer - Partnerskapen > Home - About us - PressQuestion 2 :Can I hide an article for a version language only ?Exemple 2 :article 1 available in "no" version and not in "en" version.Best regards,CB.

Abdelkader RHOUATI

Friday 23 April 2010 5:11:27 am

Hi,

Yes you can, just as you create object in French, so they are visible only on the siteaccess in fr, and in the same way you do for other siteaccess.

There is an option "Use the main language if no translation." for retrieving the object / node in the primary language, if there is no translation of the main language, you must ensure that it has disabled. This option appears in full view of the object in the block of translation.

I hope it's will help ;)

TKS

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Paul Leclercq

Wednesday 05 May 2010 8:41:00 am

the best method as far as I can see is to create a siteaccess for each language:

In your settings/override/site.ini.append.php file:

[SiteAccessSettings]
AvailableSiteAccessList[]=fr
AvailableSiteAccessList[]=en
AvailableSiteAccessList[]=de

then create the folders in these files:

settings/siteaccess/fr/site.ini.append.php
settings/siteaccess/de/site.ini.append.php
settings/siteaccess/en/site.ini.append.php

You will need to set the appropriate values in this section:

-----------------------
[DesignSettings]
SiteDesign=en
AdditionalSiteDesignList[]=base
[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
SiteLanguageList[]=eng-GB
----------------------

Or for the english version:

-----------------
[DesignSettings]
SiteDesign=fr
AdditionalSiteDesignList[]=base
[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
SiteLanguageList[]=fre-FR

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

You will then be able to position the overrides of your files in the correct folder and you will be rolling:
In your siteaccess design exemple:
extension/mysite_extension/design/fr/templates/pagelayout.tpl
extension/mysite_extension/design/en/templates/pagelayout.tpl
If you empty the cache at this point and activate your debug, you will know see the files you use for each siteaccess, and you can write whatever logic you wish, for each language.
In the backoffice, you will just need to correctly configure the anonymous write access, for each siteaccess like I explained earliser today on this link. in order to view the files, and create the content you wish for each siteaccess.

There are other methods but this is the most, ezpublish friendly way of doing it, as far as I can see.

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 29 2025 23:52:59
Script start
Timing: Jan 29 2025 23:52:59
Module start 'layout'
Timing: Jan 29 2025 23:52:59
Module start 'content'
Timing: Jan 29 2025 23:52:59
Module end 'content'
Timing: Jan 29 2025 23:52:59
Script end

Main resources:

Total runtime0.0143 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.0078151.1953
Module start 'layout' 0.00460.0028 739.203136.6094
Module start 'content' 0.00740.0056 775.812594.0859
Module end 'content' 0.01300.0013 869.898433.9922
Script end 0.0143  903.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002315.9895140.0002
Check MTime0.00117.4242140.0001
Mysql Total
Database connection0.00096.105010.0009
Mysqli_queries0.002517.390430.0008
Looping result0.00000.076610.0000
Template Total0.00107.210.0010
Template load0.00085.365410.0008
Template processing0.00031.795710.0003
Override
Cache load0.00053.836210.0005
General
dbfile0.001611.168980.0002
String conversion0.00000.041640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs