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

eZ debug

Timing: Jan 30 2025 20:31:41
Script start
Timing: Jan 30 2025 20:31:41
Module start 'content'
Timing: Jan 30 2025 20:31:41
Module end 'content'
Timing: Jan 30 2025 20:31:42
Script end

Main resources:

Total runtime0.5787 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 588.0781370.2734
Module start 'content' 0.00950.0331 958.35161,013.7031
Module end 'content' 0.04270.5360 1,972.05473,909.0391
Script end 0.5787  5,881.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00931.6122200.0005
Check MTime0.00150.2645200.0001
Mysql Total
Database connection0.00180.318610.0018
Mysqli_queries0.421572.82601410.0030
Looping result0.00140.24681390.0000
Template Total0.535692.510.5356
Template load0.00090.162910.0009
Template processing0.534792.385510.5347
Override
Cache load0.00060.110710.0006
Sytem overhead
Fetch class attribute can translate value0.00550.942710.0055
XML
Image XML parsing0.00050.078610.0005
General
dbfile0.02814.8527200.0014
String conversion0.00000.001230.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs