fetch( 'content', 'locale' [, hash( 'locale_code', locale_code ) ] )
Name | Type | Description | Required |
---|---|---|---|
locale_code | string | The code of the locale to be fetched. | No. |
An ezlocale object.
This function fetches either the default/current locale (specified using the "Locale" directive within the "[RegionalSettings]" block of "site.ini") or the locale specified by the optional "locale_code" parameter. The "locale_code" must be a valid locale code, for example "eng-GB", "nor-NO" and so on. Locales are listed and specified in the "share/locale" directory.
{fetch( 'content', 'locale' )}
Fetches and returns the current locale.
{fetch( 'content', 'locale', hash( 'locale_code', 'rus-RU' ) )}
Fetches and returns the Russian locale.