class StubLocale extends Locale

deprecated since version 2.3, to be removed in 3.0. Use {@link \Symfony\Component\Intl\Locale\Locale} and {@link \Symfony\Component\Intl\Intl} instead.

Alias of {@link \Symfony\Component\Intl\Locale\Locale}.

Constants

DEFAULT_LOCALE

ACTUAL_LOCALE

VALID_LOCALE

LANG_TAG

EXTLANG_TAG

SCRIPT_TAG

REGION_TAG

VARIANT_TAG

GRANDFATHERED_LANG_TAG

PRIVATE_TAG

Methods

static string
acceptFromHttp(string $header)

Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616.

from Locale
static string
composeLocale(array $subtags)

Not supported. Returns a correctly ordered and delimited locale code.

from Locale
static string
filterMatches(string $langtag, string $locale, bool $canonicalize = false)

Not supported. Checks if a language tag filter matches with locale.

from Locale
static array
getAllVariants(string $locale)

Not supported. Returns the variants for the input locale.

from Locale
static string
getDefault()

Returns the default locale.

from Locale
static string
getDisplayLanguage(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale language.

from Locale
static string
getDisplayName(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale.

from Locale
static string
getDisplayRegion(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale region.

from Locale
static string
getDisplayScript(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale script.

from Locale
static string
getDisplayVariant(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale variant.

from Locale
static array
getKeywords(string $locale)

Not supported. Returns the keywords for the locale.

from Locale
static string|null
getPrimaryLanguage(string $locale)

Not supported. Returns the primary language for the locale.

from Locale
static string|null
getRegion(string $locale)

Not supported. Returns the region for the locale.

from Locale
static string|null
getScript(string $locale)

Not supported. Returns the script for the locale.

from Locale
static 
lookup(array $langtag, string $locale, bool $canonicalize = false, string $default = null)

Not supported. Returns the closest language tag for the locale.

from Locale
static array
parseLocale(string $locale)

Not supported. Returns an associative array of locale identifier subtags.

from Locale
static bool
setDefault(string $locale)

Not supported. Sets the default runtime locale.

from Locale
static array
getCurrenciesData(string $locale)

Returns the currencies data.

static array
getDisplayCurrencies(string $locale)

Returns the currencies names for a locale.

static array
getCurrencies()

Returns all available currencies codes.

static 
getDataDirectory()

No description

Details

in Locale at line line 55
static string acceptFromHttp(string $header)

Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616.

Parameters

string $header The string containing the "Accept-Language" header value

Return Value

string The corresponding locale code

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.acceptfromhttp.php

in Locale at line line 71
static string composeLocale(array $subtags)

Not supported. Returns a correctly ordered and delimited locale code.

Parameters

array $subtags A keyed array where the keys identify the particular locale code subtag

Return Value

string The corresponding locale code

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.composelocale.php

in Locale at line line 89
static string filterMatches(string $langtag, string $locale, bool $canonicalize = false)

Not supported. Checks if a language tag filter matches with locale.

Parameters

string $langtag The language tag to check
string $locale The language range to check against
bool $canonicalize

Return Value

string The corresponding locale code

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.filtermatches.php

in Locale at line line 105
static array getAllVariants(string $locale)

Not supported. Returns the variants for the input locale.

Parameters

string $locale The locale to extract the variants from

Return Value

array The locale variants

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getallvariants.php

in Locale at line line 117
static string getDefault()

Returns the default locale.

Return Value

string The default locale code. Always returns 'en'

See also

http://www.php.net/manual/en/locale.getdefault.php

in Locale at line line 134
static string getDisplayLanguage(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale language.

Parameters

string $locale The locale code to return the display language from
string $inLocale Optional format locale code to use to display the language name

Return Value

string The localized language display name

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getdisplaylanguage.php

in Locale at line line 151
static string getDisplayName(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale.

Parameters

string $locale The locale code to return the display locale name from
string $inLocale Optional format locale code to use to display the locale name

Return Value

string The localized locale display name

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getdisplayname.php

in Locale at line line 168
static string getDisplayRegion(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale region.

Parameters

string $locale The locale code to return the display region from
string $inLocale Optional format locale code to use to display the region name

Return Value

string The localized region display name

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getdisplayregion.php

in Locale at line line 185
static string getDisplayScript(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale script.

Parameters

string $locale The locale code to return the display script from
string $inLocale Optional format locale code to use to display the script name

Return Value

string The localized script display name

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getdisplayscript.php

in Locale at line line 202
static string getDisplayVariant(string $locale, string $inLocale = null)

Not supported. Returns the localized display name for the locale variant.

Parameters

string $locale The locale code to return the display variant from
string $inLocale Optional format locale code to use to display the variant name

Return Value

string The localized variant display name

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getdisplayvariant.php

in Locale at line line 218
static array getKeywords(string $locale)

Not supported. Returns the keywords for the locale.

Parameters

string $locale The locale code to extract the keywords from

Return Value

array Associative array with the extracted variants

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getkeywords.php

in Locale at line line 234
static string|null getPrimaryLanguage(string $locale)

Not supported. Returns the primary language for the locale.

Parameters

string $locale The locale code to extract the language code from

Return Value

string|null The extracted language code or null in case of error

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getprimarylanguage.php

in Locale at line line 250
static string|null getRegion(string $locale)

Not supported. Returns the region for the locale.

Parameters

string $locale The locale code to extract the region code from

Return Value

string|null The extracted region code or null if not present

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getregion.php

in Locale at line line 266
static string|null getScript(string $locale)

Not supported. Returns the script for the locale.

Parameters

string $locale The locale code to extract the script code from

Return Value

string|null The extracted script code or null if not present

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.getscript.php

in Locale at line line 283
static lookup(array $langtag, string $locale, bool $canonicalize = false, string $default = null)

Not supported. Returns the closest language tag for the locale.

Parameters

array $langtag A list of the language tags to compare to locale
string $locale The locale to use as the language range when matching
bool $canonicalize If true, the arguments will be converted to canonical form before matching
string $default The locale to use if no match is found

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.lookup.php

in Locale at line line 299
static array parseLocale(string $locale)

Not supported. Returns an associative array of locale identifier subtags.

Parameters

string $locale The locale code to extract the subtag array from

Return Value

array Associative array with the extracted subtags

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.parselocale.php

in Locale at line line 315
static bool setDefault(string $locale)

Not supported. Sets the default runtime locale.

Parameters

string $locale The locale code

Return Value

bool true on success or false on failure

Exceptions

MethodNotImplementedException

See also

http://www.php.net/manual/en/locale.parselocale.php

at line line 51
static array getCurrenciesData(string $locale)

Returns the currencies data.

Parameters

string $locale

Return Value

array The currencies data

at line line 69
static array getDisplayCurrencies(string $locale)

Returns the currencies names for a locale.

Parameters

string $locale The locale to use for the currencies names

Return Value

array The currencies names with their codes as keys

Exceptions

InvalidArgumentException When the locale is different than 'en'

at line line 83
static array getCurrencies()

Returns all available currencies codes.

Return Value

array The currencies codes

at line line 88
static getDataDirectory()