Skip to the content
Documentation

locale_list

No ratings yet

Summary

Fetches the available locales.

Usage

fetch( 'content', 'locale_list' )

Returns

An array of ezlocale objects.

Description

This function fetches all the available locales and returns an array of ezlocale objects.

Examples

Example 1

{def $locales=fetch( 'content', 'locale_list' )}

{foreach $locales as $locale}
    {$locale.locale_code} : {$locale.country_name} <br />
{/foreach}

Outputs the locale codes and the names of the countries that the different locales belong to.

Changed in Exponential 6.0.15

The parameters of fetch( 'content', 'locale_list' ) as kernel/content/function_definition.php of Exponential 6.0.15 defines them (eZContentFunctionCollection::fetchLocaleList()):

Parameter Change
with_variations Defined in 6.0.15 (type boolean, required: No., default true); this page did not list it.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.