LanguageBundle
class LanguageBundle extends LanguageDataProvider implements LanguageBundleInterface
Default implementation of {@link LanguageBundleInterface}.
Methods
__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider)
Creates a new language bundle.
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.
Details
at line line 46
__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider)
Creates a new language bundle.
in LanguageDataProvider at line line 50
getLanguages()
in LanguageDataProvider at line line 55
getAliases()
in LanguageDataProvider at line line 60
getName($language, $displayLocale = null)
in LanguageDataProvider at line line 69
getNames($displayLocale = null)
in LanguageDataProvider at line line 87
getAlpha3Code($language)
at line line 57
string|null
getLanguageName(string $language, string|null $region = null, string $displayLocale = null)
Returns the name of a language.
at line line 78
string[]
getLanguageNames(string $displayLocale = null)
Returns the names of all known languages.
at line line 90
string|null
getScriptName(string $script, string $language = null, string $displayLocale = null)
Returns the name of a script.
at line line 102
string[]
getScriptNames(string $displayLocale = null)
Returns the names of all known scripts.
at line line 114
string[]
getLocales()
Returns the list of locales that this bundle supports.