class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface
Default implementation of {@link LocaleBundleInterface}.
__construct(string $path, BundleEntryReaderInterface $reader) Creates a data provider that reads locale-related data from .res files. | from LocaleDataProvider | |
getLocales() | ||
getAliases() | from LocaleDataProvider | |
getName($locale, $displayLocale = null) | from LocaleDataProvider | |
getNames($displayLocale = null) | from LocaleDataProvider | |
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. |
Creates a data provider that reads locale-related data from .res files.
string | $path | The path to the directory containing the .res files |
BundleEntryReaderInterface | $reader | The reader for reading the .res files |
$locale | ||
$displayLocale |
$displayLocale |
Returns the name of a locale.
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()}. |
string|null | The name of the locale or NULL if not found |
Returns the names of all known locales.
string | $displayLocale | Optional. The locale to return the names in Defaults to {@link \Locale::getDefault()}. |
string[] | A list of locale names indexed by locale codes |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Intl/ResourceBundle/LocaleBundle.html