LanguageBundleInterface

interface LanguageBundleInterface implements ResourceBundleInterface

Gives access to language-related ICU data.

Methods

string[] getLocales()

Returns the list of locales that this bundle supports.

from ResourceBundleInterface
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.

Details

string[] getLocales()

Returns the list of locales that this bundle supports.

Return Value

string[] A list of locale codes

string|null getLanguageName(string $language, string|null $region = null, string $displayLocale = null)

Returns the name of a language.

Parameters

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()}.

Return Value

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

string[] getLanguageNames(string $displayLocale = null)

Returns the names of all known languages.

Parameters

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

Return Value

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

string|null getScriptName(string $script, string $language = null, string $displayLocale = null)

Returns the name of a script.

Parameters

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()}.

Return Value

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

string[] getScriptNames(string $displayLocale = null)

Returns the names of all known scripts.

Parameters

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

Return Value

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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Intl/ResourceBundle/LanguageBundleInterface.html