Translating strings which aren't objects?

Author Message

Cristina Carvalho

Sunday 12 December 2010 6:32:52 am

I apologize in advance if my question has an obvious answer which I'm missing, but I've read all the documentation concerning translation and I haven't found out where do I define strings which aren't really objects. The little words we need here and there in our interface, where do we define and translate them?

Edi Modrić

Sunday 12 December 2010 7:17:22 am

You can use i18n template operator to mark your strings for translation.

Take a look at the URL below for examples:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Template-operators/Formatting-and-internationalization/i18n

Default eZ Publish translation files are located in share/translations folder and, ofcourse, you can add your own translation files in your extension.

You need to add the following in your site.ini

[RegionalSettings]
TranslationExtensions[]=myextension
and place your translation files in the folder extension/myextension/translations with the same folder/file structure as share/translations folder.

eZ Publish certified developer

http://ez.no/certification/verify/350658

Cristina Carvalho

Sunday 12 December 2010 7:44:10 am

"

You can use i18n template operator to mark your strings for translation.

Take a look at the URL below for examples:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Template-operators/Formatting-and-internationalization/i18n

Default eZ Publish translation files are located in share/translations folder and, ofcourse, you can add your own translation files in your extension.

You need to add the following in your site.ini

[RegionalSettings]
TranslationExtensions[]=ez_mojvecernji
and place your translation files in the folder extension/myextension/translations with the same folder/file structure as share/translations folder.

"

I had read that article but I didn't know about the part where we can define our own extensions and that is what the previous developer had done to the main language. Now I found the .ts file and can happily add news strings. Thank you so much for your answer! :)

Edi Modrić

Sunday 12 December 2010 8:04:00 am

No problem :)

Glad I could help you! :)

eZ Publish certified developer

http://ez.no/certification/verify/350658

Olaf Fichtner

Thursday 20 January 2011 9:06:37 pm

Ah, exactly what I had been looking for! And after the usual headbanging due to eZP's complexity it even worked. Thanks!

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 02:19:38
Script start
Timing: Jan 18 2025 02:19:38
Module start 'layout'
Timing: Jan 18 2025 02:19:38
Module start 'content'
Timing: Jan 18 2025 02:19:39
Module end 'content'
Timing: Jan 18 2025 02:19:39
Script end

Main resources:

Total runtime0.7273 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 588.0469152.6406
Module start 'layout' 0.00720.0045 740.687539.4688
Module start 'content' 0.01170.7140 780.1563600.2500
Module end 'content' 0.72570.0016 1,380.406316.1406
Script end 0.7272  1,396.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4736160.0002
Check MTime0.00140.1909160.0001
Mysql Total
Database connection0.00170.234810.0017
Mysqli_queries0.660090.7476650.0102
Looping result0.00080.1067630.0000
Template Total0.690294.920.3451
Template load0.00230.315520.0011
Template processing0.687994.580120.3439
Template load and register function0.00010.015410.0001
states
state_id_array0.00090.124610.0009
state_identifier_array0.00120.165320.0006
Override
Cache load0.00190.2597330.0001
Sytem overhead
Fetch class attribute can translate value0.00080.106130.0003
Fetch class attribute name0.00220.298770.0003
XML
Image XML parsing0.00150.210130.0005
class_abstraction
Instantiating content class attribute0.00000.002890.0000
General
dbfile0.00100.1329220.0000
String conversion0.00000.001140.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
5content/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
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs