php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
Locale Class Reference

Static Public Member Functions

static getDefault ()
 
static setDefault (string $locale)
 
static getPrimaryLanguage (string $locale)
 
static getScript (string $locale)
 
static getRegion (string $locale)
 
static getKeywords (string $locale)
 
static getDisplayScript (string $locale, ?string $displayLocale=null)
 
static getDisplayRegion (string $locale, ?string $displayLocale=null)
 
static getDisplayName (string $locale, ?string $displayLocale=null)
 
static getDisplayLanguage (string $locale, ?string $displayLocale=null)
 
static getDisplayVariant (string $locale, ?string $displayLocale=null)
 
static composeLocale (array $subtags)
 
static parseLocale (string $locale)
 
static getAllVariants (string $locale)
 
static filterMatches (string $languageTag, string $locale, bool $canonicalize=false)
 
static lookup (array $languageTag, string $locale, bool $canonicalize=false, ?string $defaultLocale=null)
 
static canonicalize (string $locale)
 
static acceptFromHttp (string $header)
 

Data Fields

const int ACTUAL_LOCALE = UNKNOWN
 
const int VALID_LOCALE = UNKNOWN
 
const null DEFAULT_LOCALE = null
 
const string LANG_TAG = UNKNOWN
 
const string EXTLANG_TAG = UNKNOWN
 
const string SCRIPT_TAG = UNKNOWN
 
const string REGION_TAG = UNKNOWN
 
const string VARIANT_TAG = UNKNOWN
 
const string GRANDFATHERED_LANG_TAG = UNKNOWN
 
const string PRIVATE_TAG = UNKNOWN
 

Detailed Description

@generate-class-entries

Definition at line 5 of file locale.stub.php.

Member Function Documentation

◆ acceptFromHttp()

static Locale::acceptFromHttp ( string $header)
static

@tentative-return-type @alias locale_accept_from_http

Definition at line 135 of file locale.stub.php.

◆ canonicalize()

static Locale::canonicalize ( string $locale)
static

@tentative-return-type @alias locale_canonicalize

Definition at line 129 of file locale.stub.php.

◆ composeLocale()

static Locale::composeLocale ( array $subtags)
static

@tentative-return-type @alias locale_compose

Definition at line 99 of file locale.stub.php.

◆ filterMatches()

static Locale::filterMatches ( string $languageTag,
string $locale,
bool $canonicalize = false )
static

@tentative-return-type @alias locale_filter_matches

Definition at line 117 of file locale.stub.php.

◆ getAllVariants()

static Locale::getAllVariants ( string $locale)
static

@tentative-return-type @alias locale_get_all_variants

Definition at line 111 of file locale.stub.php.

◆ getDefault()

static Locale::getDefault ( )
static

@tentative-return-type @alias locale_get_default

Definition at line 32 of file locale.stub.php.

◆ getDisplayLanguage()

static Locale::getDisplayLanguage ( string $locale,
?string $displayLocale = null )
static

@tentative-return-type @alias locale_get_display_language

Definition at line 87 of file locale.stub.php.

◆ getDisplayName()

static Locale::getDisplayName ( string $locale,
?string $displayLocale = null )
static

@tentative-return-type @alias locale_get_display_name

Definition at line 81 of file locale.stub.php.

◆ getDisplayRegion()

static Locale::getDisplayRegion ( string $locale,
?string $displayLocale = null )
static

@tentative-return-type @alias locale_get_display_region

Definition at line 75 of file locale.stub.php.

◆ getDisplayScript()

static Locale::getDisplayScript ( string $locale,
?string $displayLocale = null )
static

@tentative-return-type @alias locale_get_display_script

Definition at line 69 of file locale.stub.php.

◆ getDisplayVariant()

static Locale::getDisplayVariant ( string $locale,
?string $displayLocale = null )
static

@tentative-return-type @alias locale_get_display_variant

Definition at line 93 of file locale.stub.php.

◆ getKeywords()

static Locale::getKeywords ( string $locale)
static
Returns
array<string, string>|false|null @tentative-return-type @alias locale_get_keywords

Definition at line 63 of file locale.stub.php.

◆ getPrimaryLanguage()

static Locale::getPrimaryLanguage ( string $locale)
static

@tentative-return-type @alias locale_get_primary_language

Definition at line 44 of file locale.stub.php.

◆ getRegion()

static Locale::getRegion ( string $locale)
static

@tentative-return-type @alias locale_get_region

Definition at line 56 of file locale.stub.php.

◆ getScript()

static Locale::getScript ( string $locale)
static

@tentative-return-type @alias locale_get_script

Definition at line 50 of file locale.stub.php.

◆ lookup()

static Locale::lookup ( array $languageTag,
string $locale,
bool $canonicalize = false,
?string $defaultLocale = null )
static

@tentative-return-type @alias locale_lookup

Definition at line 123 of file locale.stub.php.

◆ parseLocale()

static Locale::parseLocale ( string $locale)
static

@tentative-return-type @alias locale_parse

Definition at line 105 of file locale.stub.php.

◆ setDefault()

static Locale::setDefault ( string $locale)
static

@tentative-return-type @alias locale_set_default

Definition at line 38 of file locale.stub.php.

Field Documentation

◆ ACTUAL_LOCALE

const int Locale::ACTUAL_LOCALE = UNKNOWN

@cvalue ULOC_ACTUAL_LOCALE

Definition at line 8 of file locale.stub.php.

◆ DEFAULT_LOCALE

const null Locale::DEFAULT_LOCALE = null

Definition at line 12 of file locale.stub.php.

◆ EXTLANG_TAG

const string Locale::EXTLANG_TAG = UNKNOWN

@cvalue LOC_EXTLANG_TAG

Definition at line 16 of file locale.stub.php.

◆ GRANDFATHERED_LANG_TAG

const string Locale::GRANDFATHERED_LANG_TAG = UNKNOWN

@cvalue LOC_GRANDFATHERED_LANG_TAG

Definition at line 24 of file locale.stub.php.

◆ LANG_TAG

const string Locale::LANG_TAG = UNKNOWN

@cvalue LOC_LANG_TAG

Definition at line 14 of file locale.stub.php.

◆ PRIVATE_TAG

const string Locale::PRIVATE_TAG = UNKNOWN

@cvalue LOC_PRIVATE_TAG

Definition at line 26 of file locale.stub.php.

◆ REGION_TAG

const string Locale::REGION_TAG = UNKNOWN

@cvalue LOC_REGION_TAG

Definition at line 20 of file locale.stub.php.

◆ SCRIPT_TAG

const string Locale::SCRIPT_TAG = UNKNOWN

@cvalue LOC_SCRIPT_TAG

Definition at line 18 of file locale.stub.php.

◆ VALID_LOCALE

const int Locale::VALID_LOCALE = UNKNOWN

@cvalue ULOC_VALID_LOCALE

Definition at line 10 of file locale.stub.php.

◆ VARIANT_TAG

const string Locale::VARIANT_TAG = UNKNOWN

@cvalue LOC_VARIANT_TAG

Definition at line 22 of file locale.stub.php.


The documentation for this class was generated from the following file: