class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface

Default implementation of {@link LocaleBundleInterface}.

Methods

__construct(string $path, BundleEntryReaderInterface $reader)

Creates a data provider that reads locale-related data from .res files.

getLocales()

No description

getAliases()

No description

getName($locale, $displayLocale = null)

No description

getNames($displayLocale = null)

No description

string|null
getLocaleName(string $locale, string $displayLocale = null)

Returns the name of a locale.

string[]
getLocaleNames(string $displayLocale = null)

Returns the names of all known locales.

Details

in LocaleDataProvider at line 35
__construct(string $path, BundleEntryReaderInterface $reader)

Creates a data provider that reads locale-related data from .res files.

Parameters

string $path The path to the directory containing the .res files
BundleEntryReaderInterface $reader The reader for reading the .res files

at line 29
getLocales()

in LocaleDataProvider at line 46
getAliases()

in LocaleDataProvider at line 57
getName($locale, $displayLocale = null)

Parameters

$locale
$displayLocale

in LocaleDataProvider at line 66
getNames($displayLocale = null)

Parameters

$displayLocale

at line 41
string|null getLocaleName(string $locale, string $displayLocale = null)

Returns the name of a locale.

Parameters

string $locale The locale to return the name of (e.g. "de_AT")
string $displayLocale Optional. The locale to return the name in Defaults to {@link \Locale::getDefault()}.

Return Value

string|null The name of the locale or NULL if not found

at line 53
string[] getLocaleNames(string $displayLocale = null)

Returns the names of all known locales.

Parameters

string $displayLocale Optional. The locale to return the names in Defaults to {@link \Locale::getDefault()}.

Return Value

string[] A list of locale names indexed by locale codes