mediatekformation

LanguageBundleInterface extends ResourceBundleInterface

Gives access to language-related ICU data.

Tags
author

Bernhard Schussek bschussek@gmail.com

deprecated

since Symfony 4.3, to be removed in 5.0.

Table of Contents

getLanguageName()  : string|null
Returns the name of a language.
getLanguageNames()  : array<string|int, string>
Returns the names of all known languages.
getLocales()  : array<string|int, string>
Returns the list of locales that this bundle supports.
getScriptName()  : string|null
Returns the name of a script.
getScriptNames()  : array<string|int, string>
Returns the names of all known scripts.

Methods

getLanguageName()

Returns the name of a language.

public getLanguageName(string $language[, string|null $region = null ][, string $displayLocale = null ]) : string|null
Parameters
$language : string

A language code (e.g. "en")

$region : string|null = null

Optional. A region code (e.g. "US")

$displayLocale : string = null

Optional. The locale to return the name in Defaults to .

Return values
string|null

The name of the language or NULL if not found

getLanguageNames()

Returns the names of all known languages.

public getLanguageNames([string $displayLocale = null ]) : array<string|int, string>
Parameters
$displayLocale : string = null

Optional. The locale to return the names in Defaults to .

Return values
array<string|int, string>

A list of language names indexed by language codes

getLocales()

Returns the list of locales that this bundle supports.

public getLocales() : array<string|int, string>
Return values
array<string|int, string>

A list of locale codes

getScriptName()

Returns the name of a script.

public getScriptName(string $script[, string $language = null ][, string $displayLocale = null ]) : string|null
Parameters
$script : string

A script code (e.g. "Hans")

$language : string = null

Optional. A language code (e.g. "zh")

$displayLocale : string = null

Optional. The locale to return the name in Defaults to .

Return values
string|null

The name of the script or NULL if not found

getScriptNames()

Returns the names of all known scripts.

public getScriptNames([string $displayLocale = null ]) : array<string|int, string>
Parameters
$displayLocale : string = null

Optional. The locale to return the names in Defaults to .

Return values
array<string|int, string>

A list of script names indexed by script codes

Search results