LanguageBundle
class LanguageBundle extends LanguageDataProvider implements LanguageBundleInterface
Default implementation of {@link LanguageBundleInterface}.
Methods
__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider)
Creates a data provider that reads locale-related data from .res files.
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
__construct(string $path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider)
Creates a data provider that reads locale-related data from .res files.
string|null
getLanguageName(string $language, string|null $region = null, string $displayLocale = null)
Returns the name of a language.