Forums / General / Languages system

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.

eZ debug

Timing: Jan 18 2025 00:00:51
Script start
Timing: Jan 18 2025 00:00:51
Module start 'content'
Timing: Jan 18 2025 00:00:52
Module end 'content'
Timing: Jan 18 2025 00:00:52
Script end

Main resources:

Total runtime0.8048 sec
Peak memory usage4,096.0000 KB
Database Queries196

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 589.7422180.8516
Module start 'content' 0.00790.6870 770.5938591.9453
Module end 'content' 0.69480.1099 1,362.5391332.7734
Script end 0.8047  1,695.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5197210.0002
Check MTime0.00140.1774210.0001
Mysql Total
Database connection0.00110.137110.0011
Mysqli_queries0.729790.67401960.0037
Looping result0.00180.22551940.0000
Template Total0.770595.720.3853
Template load0.00190.231820.0009
Template processing0.768695.507720.3843
Template load and register function0.00010.017310.0001
states
state_id_array0.00190.234810.0019
state_identifier_array0.00100.128120.0005
Override
Cache load0.00160.1995500.0000
Sytem overhead
Fetch class attribute can translate value0.00120.154840.0003
Fetch class attribute name0.00220.274250.0004
XML
Image XML parsing0.00220.269640.0005
class_abstraction
Instantiating content class attribute0.00000.002150.0000
General
dbfile0.00380.4699320.0001
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.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
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs