translation of an extension

Author Message

Georg Franz

Wednesday 16 July 2003 4:16:06 pm

Hi,

I am trying to make my first extension. I also want to use the translation feature of ez.

I've created the translation files in my extension directory with ezlupdate. But if I load the template, no translation is performed.

Do I have to put the new extension-translation in some ini.append file? Have anybody a tip for me?

Kind regards,
Emil.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Jan Borsodi

Thursday 17 July 2003 1:47:00 am

To create translations for extensions you must make sure you are using the x18n operator instead of the i18n. The x18n operator is similar to i18n but takes the extension name as the first parameter, ie.
{"Name"|x18n('myextension','design/standard')}
Then create the translation file with lupdate and place it in extension/yourextension/translations.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Georg Franz

Thursday 17 July 2003 5:05:36 am

Hi,

thanx for your quick answer!

Maybe it's a bug of ezlupdate (windows version) or something else:

If you write something like
{"Okay"|x18n('mymodule', 'design/standard')}

the translation file will be "corrupted", in the ts-file following entry is produced:
<name>&apos;design/standard&apos;)}&quot;</name>
(instead of <name>design/standard</name>)

So don't make a whitespace between 'mymodule' and 'design/standard'.

{"Okay"|x18n('mymodule','design/standard')}

will work.

Kind regards,
Emil.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Jan Borsodi

Thursday 17 July 2003 5:25:55 am

Yes, it sounds like a bug in ezlupdate. We will take a look at this.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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 18:20:28
Script start
Timing: Jan 18 2025 18:20:28
Module start 'layout'
Timing: Jan 18 2025 18:20:28
Module start 'content'
Timing: Jan 18 2025 18:20:29
Module end 'content'
Timing: Jan 18 2025 18:20:29
Script end

Main resources:

Total runtime0.8658 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 587.9141152.6250
Module start 'layout' 0.00650.0025 740.539139.4453
Module start 'content' 0.00900.8551 779.9844556.0234
Module end 'content' 0.86410.0017 1,336.007812.1641
Script end 0.8658  1,348.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3543160.0002
Check MTime0.00130.1449160.0001
Mysql Total
Database connection0.00100.111510.0010
Mysqli_queries0.804692.9374600.0134
Looping result0.00050.0627580.0000
Template Total0.837696.720.4188
Template load0.00200.230920.0010
Template processing0.835696.506920.4178
Template load and register function0.00010.010710.0001
states
state_id_array0.00120.136110.0012
state_identifier_array0.00070.085820.0004
Override
Cache load0.00170.1936330.0001
Sytem overhead
Fetch class attribute can translate value0.00060.065520.0003
Fetch class attribute name0.00120.139260.0002
XML
Image XML parsing0.00150.171420.0007
class_abstraction
Instantiating content class attribute0.00000.002380.0000
General
dbfile0.00100.1208230.0000
String conversion0.00000.000740.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs