ZenMagick 0.9.10


org.zenmagick.core.services.locale\ZMLocales
core\services\locale\ZMLocales.php at line 35

Class ZMLocales

ZMObject
└─ZMLocales

public class ZMLocales
extends ZMObject

Locale service.

Delegates translations to an instance of ZMLocale.

The implementation used can be configured via the setting 'zenmagick.core.locales.provider'. If none is configured, a default echo implementation will be used.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create new instance.

ZMLocale

getLocale(boolean reload, string locale)

Get the locale to be used.

array

getLocalesList()

Get locales.

void

init(string locale)

Init locale.

static void

instance()

Get instance.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

core\services\locale\ZMLocales.php at line 43

__construct

public void __construct()

Create new instance.


core\services\locale\ZMLocales.php at line 74

getLocale

public ZMLocale getLocale(boolean reload, string locale)

Get the locale to be used.

The reload flag is mainly to allow applications to switch to a different locale implementation at a later stage during startup.

Parameters:
reload - Optional flag to force a reload; default is false.
locale - Optional locale to init the locale if a new one is created; default is null.
Returns:
The locale.

core\services\locale\ZMLocales.php at line 100

getLocalesList

public array getLocalesList()

Get locales.

Returns:
Map of all available locales with the locale as key and the name as value.

core\services\locale\ZMLocales.php at line 91

init

public void init(string locale)

Init locale.

Parameters:
locale - The locale name, for example: en_NZ.

core\services\locale\ZMLocales.php at line 59

instance

public static void instance()

Get instance.


ZenMagick 0.9.10