Current Language

Author Message

Peter Scheir

Friday 20 May 2005 5:01:13 am

Hi! Is there a way to get the language which is currently used for rendering the content? I.e. is there a variable I can access in a template which is telling me what language currently is used?

Thank you,
Peter

Xavier Dutoit

Friday 20 May 2005 5:14:28 am

Hi,

I think node.object.default_language contains something like that. Could you test and tell us if it works?

Have a look at this spec, might give some ideas on what's cooking at ezlab:
http://ez.no/community/developer/specs/improved_content_multilangue_support

As always, {$node|attribute(show,2)} is your friend.

X+

http://www.sydesy.com

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 19 2025 08:49:49
Script start
Timing: Jan 19 2025 08:49:49
Module start 'layout'
Timing: Jan 19 2025 08:49:49
Module start 'content'
Timing: Jan 19 2025 08:49:49
Module end 'content'
Timing: Jan 19 2025 08:49:49
Script end

Main resources:

Total runtime0.0140 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.0048 589.0391152.6094
Module start 'layout' 0.00480.0034 741.648439.4141
Module start 'content' 0.00810.0040 781.062589.3047
Module end 'content' 0.01220.0018 870.367230.3047
Script end 0.0140  900.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002417.0146140.0002
Check MTime0.00117.9286140.0001
Mysql Total
Database connection0.00075.281210.0007
Mysqli_queries0.002820.194830.0009
Looping result0.00000.135810.0000
Template Total0.001510.610.0015
Template load0.00085.559510.0008
Template processing0.00074.991010.0007
Override
Cache load0.00053.716510.0005
General
dbfile0.00031.985580.0000
String conversion0.00000.056040.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