Forums / Setup & design / Multiple translation.ts files

Multiple translation.ts files

Author Message

AGUENOT Nicolas

Thursday 20 May 2010 2:06:08 am

Hi,
I need your help because I don't know how I can to have 2 files translations for a same language.
Allow me to explain : I've a multilingual website with a general and technical language and I would like to dissociate these both types of language because general language shouldn't be change contrary to technical language.
I'd like to do something of this kind :

  • share/translations/fre-FR/translation.ts
  • share/translations/fre-FR/translation-technic.ts

For this multilangual website, I use EzPublish 4.2.0.
Do you have an idea for my problem ?

Thanks a lot

Nicolas Pastorino

Thursday 20 May 2010 2:36:18 am

Hi Nicolas and congrats for your first post here (although you are no foreigner to the eZ Community, plugged-in on twitter as @nigo_agt ),

From the top of my head i'd suggest creating a new translation for the technical language, something like fre-FR-tech, and create a new siteaccess for showing it. You may want to have a look at this to build this new extension as an extension : http://ez.no/ezpublish/documentation/development/extensions/translation

Hoping that we'll get more replies on this one !
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Kevin Gaudin

Thursday 20 May 2010 2:48:25 am

My first post was wrong, here is what I had in mind with full details :

http://serwatka.net/blog/overriding_translations_in_ez_publish_4_1_and_higher

Twitter: @kevingaudin

AGUENOT Nicolas

Thursday 20 May 2010 3:00:35 am

Thanks @jeanvoye and Kevin Gaudin,

I will try to implement this and informed you as soon as it's good

Thanks a lot

Nicolas AGUENOT

@nico_agt

Paul Leclercq

Thursday 20 May 2010 3:52:14 am

Personaly I would just use different contexts in your translation files.

for exemple:

{"My text"|i18n('mysite-technical/my_template')}

Or
{"My text"|i18n('mysite/my_template')}

You will then simply differenciate this in your translation file:
extension/technical_trans/translations/fre-FR/translation.ts

with this in the context
<context>
<name>mysite-technical/my_template</name>
<message>
<source>French</source>
<translation>Français</translation>
</message>
</context>

<context>
<name>mysite/my_template</name>
<message>
<source>Technical French</source>
<translation>Français technique</translation>
</message>
</context>

You can use 2 extensions, in order to split this in 2 translation files if you wish, but it may not be necessary.

Frederik Krautwald

Saturday 20 November 2010 3:15:33 pm

"

Hi Nicolas and congrats for your first post here (although you are no foreigner to the eZ Community, plugged-in on twitter as @nigo_agt ),

From the top of my head i'd suggest creating a new translation for the technical language, something like fre-FR-tech, and create a new siteaccess for showing it. You may want to have a look at this to build this new extension as an extension : http://ez.no/ezpublish/documentation/development/extensions/translation

Hoping that we'll get more replies on this one !
Cheers,

"

The link is dead!

Frederik Krautwald
Executive Creative Director

Heath

Saturday 20 November 2010 4:03:05 pm

@ Frederik

Here is the update link location, http://auth.ez.no/ezpublish/documentation/development/extensions/translation

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

eZ debug

Timing: Jan 18 2025 00:02:05
Script start
Timing: Jan 18 2025 00:02:05
Module start 'content'
Timing: Jan 18 2025 00:02:07
Module end 'content'
Timing: Jan 18 2025 00:02:07
Script end

Main resources:

Total runtime1.6937 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 589.1406180.8359
Module start 'content' 0.00851.6743 769.9766769.0781
Module end 'content' 1.68290.0108 1,539.054750.1094
Script end 1.6936  1,589.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.2368140.0003
Check MTime0.00140.0830140.0001
Mysql Total
Database connection0.00090.053810.0009
Mysqli_queries1.604794.7418800.0201
Looping result0.00100.0612780.0000
Template Total1.663398.220.8317
Template load0.00250.145820.0012
Template processing1.660998.059020.8304
Template load and register function0.00050.030310.0005
states
state_id_array0.00030.017910.0003
state_identifier_array0.00090.053220.0005
Override
Cache load0.00220.1301700.0000
Sytem overhead
Fetch class attribute can translate value0.00110.065960.0002
Fetch class attribute name0.00390.2293120.0003
XML
Image XML parsing0.00760.447160.0013
class_abstraction
Instantiating content class attribute0.00000.0014120.0000
General
dbfile0.01170.6897420.0003
String conversion0.00000.000530.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
17content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 44
 Number of unique templates used: 10

Time used to render debug report: 0.0001 secs