class LanguageBundle extends LanguageDataProvider implements LanguageBundleInterface
Default implementation of {@link LanguageBundleInterface}.
__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider) Creates a data provider that reads locale-related data from .res files. | ||
getLanguages() | from LanguageDataProvider | |
getAliases() | from LanguageDataProvider | |
getName($language, $displayLocale = null) | from LanguageDataProvider | |
getNames($displayLocale = null) | from LanguageDataProvider | |
getAlpha3Code($language) | from LanguageDataProvider | |
string|null | getLanguageName(string $language, string|null $region = null, string $displayLocale = null) Returns the name of a language. | |
string[] | getLanguageNames(string $displayLocale = null) Returns the names of all known languages. | |
string|null | getScriptName(string $script, string $language = null, string $displayLocale = null) Returns the name of a script. | |
string[] | getScriptNames(string $displayLocale = null) Returns the names of all known scripts. | |
string[] | getLocales() Returns the list of locales that this bundle supports. |
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 |
LocaleDataProvider | $localeProvider | |
ScriptDataProvider | $scriptProvider |
$language | ||
$displayLocale |
$displayLocale |
$language |
Returns the name of a language.
string | $language | A language code (e.g. "en") |
string|null | $region | Optional. A region code (e.g. "US") |
string | $displayLocale | Optional. The locale to return the name in Defaults to {@link \Locale::getDefault()}. |
string|null | The name of the language or NULL if not found |
Returns the names of all known languages.
string | $displayLocale | Optional. The locale to return the names in Defaults to {@link \Locale::getDefault()}. |
string[] | A list of language names indexed by language codes |
Returns the name of a script.
string | $script | A script code (e.g. "Hans") |
string | $language | Optional. A language code (e.g. "zh") |
string | $displayLocale | Optional. The locale to return the name in Defaults to {@link \Locale::getDefault()}. |
string|null | The name of the script or NULL if not found |
Returns the names of all known scripts.
string | $displayLocale | Optional. The locale to return the names in Defaults to {@link \Locale::getDefault()}. |
string[] | A list of script names indexed by script codes |
Returns the list of locales that this bundle supports.
string[] | A list of locale codes |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Intl/ResourceBundle/LanguageBundle.html