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.