Set language template.

Author Message

Cyril LP

Wednesday 19 December 2007 8:40:17 am

Hi all,

I have an extention for payment gateway. This extention send automaticly a confirmation e-mail.
My mail is a template, so in my source code i use : $tpl =& templateInit();

But how I configure the regional settings of the template, to have my mail in the good language ?

I try : $tpl->setvariable( 'language_code', 'eng-EU'); but it dosn't work...

Thanks in advance,

C

André R.

Wednesday 19 December 2007 1:34:19 pm

With "$tpl->setvariable( 'language_code', 'eng-EU');" you set a variable in the template named $language_code to further use it in the template, is that what you want?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Cyril LP

Thursday 20 December 2007 12:29:29 am

Thanks for your answer. I want to set the language for the good translation of the template with the i18n function...

David P.

Tuesday 16 September 2008 7:40:40 am

Up!

I have the same problem with my custom extension.
My "admin" siteaccess is in french, and my extension send some confirmation e-mail to customers (french or not!).

I would like to switch regional settings to good language (customer language) before parsing my mail template witch use i18n operator...

How can I do that?

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 11:46:36
Script start
Timing: Jan 18 2025 11:46:36
Module start 'layout'
Timing: Jan 18 2025 11:46:36
Module start 'content'
Timing: Jan 18 2025 11:46:37
Module end 'content'
Timing: Jan 18 2025 11:46:37
Script end

Main resources:

Total runtime0.6313 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 591.7266152.6250
Module start 'layout' 0.00790.0029 744.351639.4297
Module start 'content' 0.01090.6190 783.7813576.2422
Module end 'content' 0.62990.0014 1,360.023412.1875
Script end 0.6312  1,372.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5087160.0002
Check MTime0.00130.2128160.0001
Mysql Total
Database connection0.00190.304110.0019
Mysqli_queries0.579191.7281620.0093
Looping result0.00070.1082600.0000
Template Total0.596694.520.2983
Template load0.00200.321420.0010
Template processing0.594694.182820.2973
Template load and register function0.00020.025710.0002
states
state_id_array0.00110.176910.0011
state_identifier_array0.00100.152720.0005
Override
Cache load0.00160.2573210.0001
Sytem overhead
Fetch class attribute can translate value0.00100.150630.0003
Fetch class attribute name0.00090.146850.0002
XML
Image XML parsing0.00070.111430.0002
class_abstraction
Instantiating content class attribute0.00000.001950.0000
General
dbfile0.00080.1205170.0000
String conversion0.00000.001940.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs