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

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 18 2025 14:55:57
Script start
Timing: Jan 18 2025 14:55:57
Module start 'layout'
Timing: Jan 18 2025 14:55:57
Module start 'content'
Timing: Jan 18 2025 14:55:58
Module end 'content'
Timing: Jan 18 2025 14:55:58
Script end

Main resources:

Total runtime0.8066 sec
Peak memory usage4,096.0000 KB
Database Queries85

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.1797152.6406
Module start 'layout' 0.00550.0030 741.820339.4766
Module start 'content' 0.00850.7966 781.2969720.2422
Module end 'content' 0.80510.0015 1,501.539124.1250
Script end 0.8065  1,525.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3659160.0002
Check MTime0.00120.1529160.0001
Mysql Total
Database connection0.00050.067110.0005
Mysqli_queries0.704887.3839850.0083
Looping result0.00080.1040830.0000
Template Total0.767195.120.3836
Template load0.00190.233620.0009
Template processing0.765294.874620.3826
Template load and register function0.00020.026410.0002
states
state_id_array0.00080.095010.0008
state_identifier_array0.00120.143720.0006
Override
Cache load0.00170.2138960.0000
Sytem overhead
Fetch class attribute can translate value0.00110.138840.0003
Fetch class attribute name0.00090.1169120.0001
XML
Image XML parsing0.00110.135440.0003
class_abstraction
Instantiating content class attribute0.00000.0041140.0000
General
dbfile0.00080.1024170.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
11content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
26content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 63
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs