locale and language-name variables in template

Author Message

Paulo Almeida

Sunday 30 March 2003 2:28:12 pm

How can i access to locale and languagename variables in template?
I am trying to not need create lots of template to use in a multilanguage sites.

Thanks in advance

Paulo Almeida

PACPI.COM Internet Consulting
http://pacpi.com

Jan Borsodi

Monday 31 March 2003 12:19:34 am

Do you mean the current locale for the site or the locales for translations of an object?

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Paulo Almeida

Monday 31 March 2003 3:03:02 am

I want to do something like, if actual locale is eng-GB then show a link to por-PT site, and if in por-pt show eng-GB link.
I hope with this you can understand me.

Paulo Almeida

PACPI.COM Internet Consulting
http://pacpi.com

Jan Borsodi

Monday 31 March 2003 3:41:57 am

You could try:
{section show=eq(ezini('RegionalSettings','Locale'),"eng-GB")}
... display por-PT link
{section-else}
... display eng-GB link
{/section}

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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

Main resources:

Total runtime0.0202 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 589.1797152.6406
Module start 'layout' 0.00830.0037 741.820339.4922
Module start 'content' 0.01200.0053 781.312593.3672
Module end 'content' 0.01730.0029 874.679734.3047
Script end 0.0201  908.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003416.9219140.0002
Check MTime0.00136.4237140.0001
Mysql Total
Database connection0.00136.239410.0013
Mysqli_queries0.003919.200230.0013
Looping result0.00000.118210.0000
Template Total0.00189.110.0018
Template load0.00115.353110.0011
Template processing0.00083.736510.0008
Override
Cache load0.00083.936210.0008
General
dbfile0.00031.646180.0000
String conversion0.00000.044940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs