Translation for Online Editor?

Author Message

Anja Lundin

Thursday 28 April 2005 4:34:27 am

Hi,
I wonder how I can translate text in the Online Editor. For example:

{"Location"|i18n("ezdhtml","design/standard/ezdhtml")}

design/standard/ezdhtml is not to be found in any of the translation.ts files and I can't find a translation file anywhere in extensions/ezdhtml either. If I add:

<context>
    <name>design/standard/ezdhtml</name>
    <message>
        <source>Location</source>
        <translation>Plats</translation>
    </message>
</context>

...to the translation.ts file, nothing happens.

How is the translation supposed to be done in the Online Editor?

I also want to know why the line says:

{"Location"|i18n("ezdhtml","design/standard/ezdhtml")}

and not just like usual:

{"Location"|i18n("design/standard/ezdhtml")}

what does ("ezdhtml", ... do?

I hope someone can answer my questions.

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

Wenyue Yu

Wednesday 04 May 2005 5:47:11 am

Hi,

The following steps should work:

1.Change

 {"Location"|i18n("ezdhtml","design/standard/ezdhtml")}

to

 {"Location"|i18n("design/standard/ezdhtml")}

since the syntax will only work for operator x18n. We will update all OE string in next version.

2. make folder translations/x-X under folder ezdhtml and make a file translation.ts under folder translations/x-X. The file might looks like this:

<!DOCTYPE TS><TS>
<context>
    <name>design/standard/ezdhtml</name>
    <message>
        <source>Location</source>
        <translation>Plats</translation>
    </message>
</context>
</TS>

3. You need to edit site.ini.append

  [RegionalSettings]
  TranslationExtensions[]=ezdhtml

Best regards,
Wenyue Yu

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 15:53:17
Script start
Timing: Jan 18 2025 15:53:17
Module start 'layout'
Timing: Jan 18 2025 15:53:17
Module start 'content'
Timing: Jan 18 2025 15:53:18
Module end 'content'
Timing: Jan 18 2025 15:53:18
Script end

Main resources:

Total runtime0.9780 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.4609152.6406
Module start 'layout' 0.00620.0056 742.101639.4766
Module start 'content' 0.01180.9646 781.5781531.4219
Module end 'content' 0.97640.0016 1,313.00008.1484
Script end 0.9780  1,321.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3363160.0002
Check MTime0.00130.1361160.0001
Mysql Total
Database connection0.00090.088110.0009
Mysqli_queries0.914593.5079540.0169
Looping result0.00060.0663520.0000
Template Total0.932995.420.4665
Template load0.00180.189120.0009
Template processing0.931195.199920.4655
Template load and register function0.00020.018710.0002
states
state_id_array0.00100.100710.0010
state_identifier_array0.00110.108620.0005
Override
Cache load0.00150.1564310.0000
Sytem overhead
Fetch class attribute can translate value0.00100.098520.0005
Fetch class attribute name0.00150.149530.0005
XML
Image XML parsing0.00470.481320.0024
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00890.9085160.0006
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs