The $language variable gives the active language. Is there a variable that gives all available languages?

Comments

matkeane’s picture

Hi,

It's not a variable, but this function should do the trick: http://api.drupal.org/api/function/locale_language_list/6

m@rtijn’s picture

Can I use these kind of functions in the page.tpl.php?

matkeane’s picture

Hi,

You can call Drupal functions from pretty much anywhere but, in general, it's considered good practice to keep as much logic (other than simple 'if this print that') as possible outside the tpl templates and, instead, use the preprocess functions in the theme template.php.

m@rtijn’s picture

Thx, I successfully used that function in my own function in template.php