Translation problem

Translation problem

Thursday 28 May 2009 1:49:07 am - 15 replies

Author Message

Gaetano Giunta

Thursday 28 May 2009 11:23:37 am

- how do you switch language exactly in the frontend?
- the correct way is two have 2 siteacceses, where in site.ini config file every siteaccess has a correct value for the Locale setting. Also remember that you have to edit your content in the 2 languages - eZP will not translate it for you...

Principal Consultant International Business
Member of the Community Project Board

Lukasz Klejnberg

Wednesday 10 June 2009 3:13:00 am

Hi,

I have same problem like "Aurélie Beaumont".
I have 3 siteaccess pol, eng, ger and i create versions some node in eng-GB and ger-DE and clear cache.
The content stays in polish but the rest of page like buttons (using i18n to translate) is translated.

Regards,
Lukasz

Gaetano Giunta

Friday 12 June 2009 5:19:09 am

Example language config for a given siteaccess (in settings/siteaccess/myaccess/site.ini.append.php)

[RegionalSettings]

# This one is the language used to display the 'site',
# that means more or less the templates
Locale=fre-FR

# This one means that the i18n calls in the templates are
# activated
TextTranslation=enabled

# This one is the language used to display the content objects
# in this siteaccess
ContentObjectLocale=fre-FR


# If an object does not exist in french, we display it in italian
SiteLanguageList[]
SiteLanguageList[]=fre-FR
SiteLanguageList[]=ita-IT

# If an object does not exist neither in french nor in italian,
# it is not shown (it might eg. exist in english)
ShowUntranslatedObjects=disabled

Principal Consultant International Business
Member of the Community Project Board

Lukasz Klejnberg

Friday 12 June 2009 6:01:58 am

Hi,

Ok i found. It was my mistake. It was wrong sequence settings in AvailableSiteAccessList, RelatedSiteAccessList, SiteLanguageList for siteaccess.

Regards,
Lukasz

Pierre SCALFATI

Monday 15 June 2009 3:38:39 am

Can you give more details Lukasz, please ?

Lukasz Klejnberg

Tuesday 16 June 2009 1:14:44 am

My default siteaccess is pol and for example in siteaccess eng should be:

site.ini.append.php

[SiteAccessSettings]
AvailableSiteAccessList[]
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=pol
AvailableSiteAccessList[]=ger
AvailableSiteAccessList[]=admin
RequireUserLogin=false
RelatedSiteAccessList[]
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=pol
RelatedSiteAccessList[]=ger
RelatedSiteAccessList[]=admin
ShowHiddenNodes=false

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=eng-GB
SiteLanguageList[]=pol-PL
SiteLanguageList[]=ger-DE
TextTranslation=enabled

[ContentSettings]
TranslationList=eng-GB

Do you have a problem with setting siteaccess language?

Regards,
Lukasz

Pierre SCALFATI

Tuesday 16 June 2009 1:56:02 am

Well,

My problem is a bit different from yours. For me the labels of fields and buttons described in templates remain in French. While the content is correctly switched from one language to another. In other words, everything which is translated using i18n EZP function is translated in French even in the English site.

I thought that having a description of what you have in your site.ini.append.php, Lukasz, could help me find what is wrong, but I'm becoming mad with this i18n function and I cannot put my site online for the moment only because of this translation problems.

If anyone has a solution, then do not hesitate.

Many thanks.

Lukasz Klejnberg

Tuesday 16 June 2009 4:37:38 am

Can you post your settings in the file site.ini.append.php French and English?

Pierre SCALFATI

Tuesday 16 June 2009 6:31:58 am

Here it is :

ENGLISH SITE:


[SiteSettings]
SiteName=Press Web site
SiteURL=/presse/index.php/eng


[SiteAccessSettings]
AvailableSiteAccessList[]
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=fre
AvailableSiteAccessList[]=ezwebin_site_admin
RequireUserLogin=false
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=ezwebin_site_admin
ShowHiddenNodes=false

[DesignSettings]
SiteDesign=ezwebin
AdditionalSiteDesignList[]=base

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=eng-GB
SiteLanguageList[]=fre-FR
TextTranslation=enabled


[ContentSettings]
TranslationList=eng-GB

FRENCH Website :


[SiteSettings]
SiteName=Site de Presse
SiteURL=/presse/index.php

[UserSettings]
RegistrationEmail=

[SiteAccessSettings]
AvailableSiteAccessList[]
AvailableSiteAccessList[]=fre
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=ezwebin_site_admin
RequireUserLogin=false
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=ezwebin_site_admin
ShowHiddenNodes=false


[DesignSettings]
SiteDesign=ezwebin
AdditionalSiteDesignList[]=base

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=fre-FR
SiteLanguageList[]=eng-GB
TextTranslation=enabled


[ContentSettings]
TranslationList=fre-FR


Lukasz Klejnberg

Wednesday 17 June 2009 1:50:03 am

It seems that your configuration is ok.

Can you check the page in debug mode for the selected language, or see in the var / log.

Pierre SCALFATI

Wednesday 17 June 2009 9:03:00 am

Hello Lukasz,

Concerning Debug mode, no error is displayed. I've only the details of every template used for the page.

Concerning de log files, I've many (3 or 4 files) and there's no specific error concerning translation problems. I've one warning file in which I've several messages concerning translations which are not found but the context of each of them is not in the context of every page of my site in which the i18n translations do not work.

I tried to make a new installation of my EZP System under a 4.1.2 version (instead of 4.1.1).
It didn't solve my problem.

I tried to download a new French translation.ts file and nothing changed...

Finally, after all those tests, even my admin console has turned to English and I was not able to get it back in French, even after having changed the RegionalSettings and declared Locale=fre-FR for site_admin siteaccess...

Fed up with this !!!!

Lukasz Klejnberg

Thursday 18 June 2009 2:47:24 am

Hi,

To test your problem I installed the latest version of eZ Publish 4.1.3 with ezwebin in three languages with the default French, English and Polish.

After installation, i go to the user/register to check whether the translations are good phrases using the i18n() and after switching from French to English version appeared in all the same language (english), and the same was of the Polish language. I checked the articles, adding a new in these three languages and was also good.

Write what is generated for the eZ Publish installation (information about the language ):

<b>settings/override/site.ini.append.php</b>

[SiteSettings]
DefaultAccess=fre
SiteList[]
SiteList[]=fre
SiteList[]=fre
SiteList[]=eng
SiteList[]=pol
SiteList[]=admin
RootNodeDepth=1

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=fre
AvailableSiteAccessList[]=fre
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=pol
AvailableSiteAccessList[]=admin
MatchOrder=uri
HostMatchMapItems[]

[RegionalSettings]
TranslationSA[]
TranslationSA[fre]=Fre
TranslationSA[eng]=Eng
TranslationSA[pol]=Pol

<b>settings/siteaccess/fre/site.ini.append.php</b>

[SiteSettings]
SiteName=Website Interface
SiteURL=localhost/test/index.php/fre
...

[SiteAccessSettings]
RequireUserLogin=false
RelatedSiteAccessList[]
RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=pol
RelatedSiteAccessList[]=admin
ShowHiddenNodes=false

[DesignSettings]
SiteDesign=ezwebin
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=base

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=fre-FR
TextTranslation=enabled

[ContentSettings]
TranslationList=eng-GB;pol-PL

<b>settings/siteaccess/eng/site.ini.append.php</b>

[SiteSettings]
SiteName=Website Interface
SiteURL=localhost/test/index.php/eng
...

[SiteAccessSettings]
RequireUserLogin=false
RelatedSiteAccessList[]
RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=fre
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=pol
RelatedSiteAccessList[]=admin
ShowHiddenNodes=false

[DesignSettings]
SiteDesign=ezwebin
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=base

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=eng-GB
SiteLanguageList[]=fre-FR
TextTranslation=disabled

[ContentSettings]
TranslationList=eng-GB;pol-PL

Like I said it checked on the version ezwebin. Maybe this information contained in the configuration files useful you are to solve your problem. If you came to what was wrong, and do write on this subject.

Regards,
Lukasz

Pierre SCALFATI

Wednesday 01 July 2009 12:50:32 am

Hello,

Finally I've found what was wrong with my configuration. I looked in my site.ini.append.php in my mysite\settings\override folder and found a RegionalSettings block which was declared with french (fre-FR) as Locale. So I removed totally from that file the [RegionalSettings] block (because everything is declared for that block in my mysite\extension\ezwebin\settings\siteaccess\fre\site.ini.append.php and mysite\extension\ezwebin\settings\siteaccess\eng\site.ini.append.php.

I went then in the site.ini.append.php which is in mysite\extension\ezwebin\settings and reduced the content of the [RegionalSettings] block to the following :

[RegionalSettings]
TranslationExtensions[]=ezwebin

I hope it will help.

Best regards.

Lukasz Klejnberg

Wednesday 01 July 2009 1:10:44 am

Hi,

It's great :) that you found a solution.

Thanks for your note.

Best regards,
Lukasz

Gaetano Giunta

Wednesday 01 July 2009 1:14:10 am

A small tip for all having the same problem: your best friend is the 'ini settings' page in the admin interface.
Pick the frontend siteacess, site.ini file, and you will immediately see what are the actual config values used by the system, instead of the ones you think it should be using.
As an added bonus, for every value you will be told where it came from, so you can easily spot an offending/forgotten extension...

Principal Consultant International Business
Member of the Community Project Board

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.