How can i access localized value of parent's parameters

Author Message

Brijesh Tekrawala

Wednesday 27 October 2010 3:17:44 am

I have used below but it is not giving localized data.

$#node.parent.data_map.param_1.data_text

Can you please provide any information you have ?

Thanks
Brijesh

Lo' F.

Wednesday 27 October 2010 3:04:49 pm

Try by launching |attribute(show) from inside the node..

{$node.object|attribute(show)}

the list of the resulting values should give useful infos to help you decide which attribute you may need to use.

loredanaebook.it

Brijesh Tekrawala

Wednesday 27 October 2010 11:28:51 pm

Thanks, Will check it out.

Nicolas Pastorino

Thursday 28 October 2010 1:19:21 am

Hi Brijesh,

Accessing content from the tpl language, or PHP api should automatically return the localized/translated data, if translations were setup beforehand. The chosen language/locale are conditioned by the current siteaccess' settings, in site.ini (the respective override placed in the your siteaccess directory : settings/siteaccess/<siteaccessname>/site.ini.append.php), under RegionalSettings.

The default, english eZ Flow one looks like this :

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=eng-GB
TextTranslation=disabled

More information on configuring eZ Publish for nice localisations : http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/RegionalSettings

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

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

Main resources:

Total runtime1.0094 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.0086 588.1563152.6563
Module start 'layout' 0.00860.0027 740.812539.5156
Module start 'content' 0.01130.9967 780.3281591.0859
Module end 'content' 1.00800.0013 1,371.414112.1094
Script end 1.0094  1,383.5234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3245160.0002
Check MTime0.00130.1293160.0001
Mysql Total
Database connection0.00110.113910.0011
Mysqli_queries0.949894.0973620.0153
Looping result0.00070.0703600.0000
Template Total0.969496.020.4847
Template load0.00230.228820.0012
Template processing0.967195.806020.4835
Template load and register function0.00020.020210.0002
states
state_id_array0.00130.126810.0013
state_identifier_array0.00200.195120.0010
Override
Cache load0.00190.1859240.0001
Sytem overhead
Fetch class attribute can translate value0.00060.056230.0002
Fetch class attribute name0.00120.122460.0002
XML
Image XML parsing0.00140.136030.0005
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00090.0869220.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
2content/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: 19
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs