Overriding standard translation with a translation extension

Author Message

Niko Goers

Wednesday 16 May 2007 4:04:26 am

Hi,

i want to override one part of the original translation with a translation extension.

<b>My extensionfolder:</b> extension/my_extension/translations/ger-DE/translation.ts

<b>translation.ts:</b>

<context>
    <name>design/standard/content/tipafriend</name>
    <message>
        <source>Tip a friend</source>
        <translation>Weiterempfehlen</translation>
    </message>
</context>

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

[...]
[ExtensionSettings]
[...]
ActiveExtensions[]=my_extension
[...]

<b>site.ini.append.php in settings/siteaccess/my_siteacces:</b>

[...]
[ExtensionSettings]
ActiveAccessExtensions[]=my_extension
[...]
[RegionalSettings]
Locale=ger-DE
ContentObjectLocale=ger-DE
SiteLanguageList[]=ger-DE
TextTranslation=enabled
TranslationExtensions[]=my_extension
[...]

Why does it not work?

Thank you for your help.

eZ Publish partner - http://www.all2e.com
http://share.ez.no/directory/companies/all2e-gmbh
http://ez.no/Partners/all2e-GmbH

Lords of Heaven - http://www.LoH-Gilde.de (Created with eZ Publish)
German online gaming guild

About me - http://www.NikoGoers.de

My roadmap, +1 are welcome: http://share.ez.no/community/roadmap/10889

Niko Goers

Saturday 19 May 2007 8:47:19 am

Any Ideas?

eZ Publish partner - http://www.all2e.com
http://share.ez.no/directory/companies/all2e-gmbh
http://ez.no/Partners/all2e-GmbH

Lords of Heaven - http://www.LoH-Gilde.de (Created with eZ Publish)
German online gaming guild

About me - http://www.NikoGoers.de

My roadmap, +1 are welcome: http://share.ez.no/community/roadmap/10889

Pascal Specht

Thursday 28 June 2007 12:59:34 am

Hi Niko,

Did you get it working? I'm struggling with the same problem: I want to change some of the translations in the translation.ts file that cames with the ezwebin interface, and want to apply my change without having to touch that particular file. I'd prefer overriding the translation.ts in an intelligent way, so that I don't have to start all over at the next release.

Any suggestions are welcome.

Pascal

Matthew Carroll

Tuesday 10 July 2007 1:44:34 pm

You need to include the following in extension/my_extension/settings/site.ini.append.php

[RegionalSettings]
TranslationExtensions[]=my_extension

...I think maybe that line doesn't work if you have it in settings/siteaccess/my_siteaccess/site.ini.append.php. Without testing I'm not 100% sure, but I set this up for one of my sites last year, and that's the setup I have now which is working.

Matthew

http://carroll.org.uk

Pascal Specht

Wednesday 11 July 2007 9:21:49 am

Just for anyone else struggling with this:

Do <b>NOT</b> use the ezwebin admin HTML interface to enable/disable extensions! it writes the extension list back in an arbitrary order. To get it working, extensions that overwrite others should be included <b>before</b> their original ones, and the only way to be sure about this is to manually modify the site.ini.overwrite.php file, not through the webmin.

Pascal

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 31 2025 01:29:56
Script start
Timing: Jan 31 2025 01:29:56
Module start 'layout'
Timing: Jan 31 2025 01:29:56
Module start 'content'
Timing: Jan 31 2025 01:29:56
Module end 'content'
Timing: Jan 31 2025 01:29:56
Script end

Main resources:

Total runtime0.0271 sec
Peak memory usage8,192.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.3906151.2422
Module start 'layout' 0.00530.0041 739.6328220.7500
Module start 'content' 0.00950.0158 960.38281,005.8984
Module end 'content' 0.02530.0017 1,966.281337.9922
Script end 0.0270  2,004.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002910.8347140.0002
Check MTime0.00114.0577140.0001
Mysql Total
Database connection0.00093.221210.0009
Mysqli_queries0.00217.653230.0007
Looping result0.00000.088110.0000
Template Total0.00134.610.0013
Template load0.00103.519710.0010
Template processing0.00031.082210.0003
Override
Cache load0.00072.467410.0007
General
dbfile0.00238.537380.0003
String conversion0.00000.029140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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