Forums / Setup & design / Translating from French to English using ezwebin

Translating from French to English using ezwebin

Author Message

David None

Tuesday 07 August 2007 11:40:56 pm

Hello,
After going through the forum and trying the suggested solutions, I did not managed to make the translation from French language (default language) to English language using extension ezwebin

I have two siteaccess: "fr" and "en" with the following site.ini.append.php configurations

# The fr siteaccess

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

# The en siteaccess

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

In my settings override I have the following site.ini.append.php

[SiteSettings]
DefaultAccess=fr
SiteList[]=fr
SiteList[]=en
SiteList[]=newsletter_editor
SiteList[]=fr_admin
...
[ExtensionSettings]
ActiveExtensions[]=ezwebin
....
[SiteSettings]
DefaultAccess=fr
...
[ContentSettings]
TranslationList=eng-GB

And in my ezwebin settings site.ini.append.php I have

[TemplateSettings]
ExtensionAutoloadPath[]=ezwebin

[RegionalSettings]
TranslationExtensions[]=ezwebin

I have in the ezwebin translations folder two folders eng-GB and fre-FR which contains both one translation.ts file.
The typical content of the translation.ts in eng-GB looks like this

<context>
	<name>design/ezwebin/pokute</name>
	<message>
		<source>Petit test</source>
		<translation>Small test</translation>
	</message>
</context>

In one template I use the following template code:

{"Petit test"|i18n('design/ezwebin/pokute')}

But the translation does not occur when I switch to the English site.
I have noticed that (ezini('RegionalSettings','Locale') gives the correct eng-GB locale when switching to the English.

Can someone help to find some solution please?
Thank you

David

Softriva .com

Thursday 09 August 2007 1:58:30 pm

First of all I would suggest to use Qt Linguist to manage your translation.ts file

http://trolltech.com/products/qt/features/internationalization?searchterm=linguist

Second, use ezlupdate utility to update your translation.ts file. The binary of this utility used to be part of ezpublish but not anymore. However, you can built it. The source can be found at

/support/lupdate-ezpublish3

Your text translation is disabled.

TextTranslation=disabled

Check that you have fra-FR.ini in your locale directory.

I hope this can help

Stephen Williams

Tuesday 25 September 2007 1:25:43 am

I am having exactly the same problem translating the Webshop from German to English.

I have performed all the same steps as David but have had no success.

The Locale is being changed which I can see through the change in currency and by outputing {ezini('RegionalSettings','Locale')}

The cache files (cache/translation) are only being generated for the extensions.

I definitely do have...

TextTranslation=enabled

... in both site.ini.append.php 's

Caching is enabled as well.

Does anyone have any ideas how I can track down the problem?

Cheers,
Stephen

Stephen Williams

Tuesday 25 September 2007 1:27:02 am

I also have no error.log in the log directory.

André R.

Tuesday 25 September 2007 2:39:37 am

As stated here:
http://ez.no/developer/forum/install_configuration/how_to_add_words_to_eng_gb_language

eng-GB is default fallback language in eZ Publish, so no translation file is used when eng-GB is used.

You could 1: use eng-Us as your english language
or 2: put the english text in the templates and use them as the base.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Stephen Williams

Tuesday 25 September 2007 5:11:34 am

Hi

I have already tried entering...

TranslationList=eng-US

but I assume that you mean my problem is that I have entered...

ContentObjectLocale=eng-GB

I have already added content with the language eng-GB. Is there a simple way to convert it all to eng-US?

Or can I change the fallback language?

Cheers,
Stephen

Stephen Williams

Tuesday 25 September 2007 5:57:26 am

I am also translating strings in the german site and it is not working here either.

[RegionalSettings]
Locale=ger-DE
ContentObjectLocale=ger-DE
SiteLanguageList[]=eng-US
SiteLanguageList[]=ger-DE
TextTranslation=enabled

[ContentSettings]
TranslationList=ger-DE

André R.

Tuesday 25 September 2007 6:09:15 am

Hi Stephen,
I don't know about a way to change the default fallback language, but if it where possible it would probably make a lot of warnings appear since there are no eng-gb translation.

I don't know of any simple way to transform content from one language to another either.

As for your German site, are regular ez publish translations working or are everything untranslated?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Stephen Williams

Tuesday 25 September 2007 6:31:03 am

Hi!

I replace the translation file with the origional one and a lot more cache files were generated. The standard translation now work.

I verified my translation file and it is correct xml but it must be another problem with this file right?

Shouldn't there be an error message somewhere that will tell me what is wrong?

thanks,
Stephen

Stephen Williams

Tuesday 25 September 2007 6:39:15 am

I think there may have been a code page problem in the .ts file as it seems to be working now after merging my .ts with the origional.

Now I just have to solve my english problem.

Thanks for the help!

André R.

Tuesday 25 September 2007 6:49:59 am

Did you remember to set TranslationExtensions to make ez publish know your extension contains translation files?

example (from ezwebin extension site.ini):

[RegionalSettings]
TranslationExtensions[]=ezwebin

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom