xref: /PHP-8.4/ext/intl/locale/locale.stub.php (revision b06c95b6)
1<?php
2
3/** @generate-class-entries */
4
5class Locale
6{
7    /** @cvalue ULOC_ACTUAL_LOCALE */
8    public const int ACTUAL_LOCALE = UNKNOWN;
9    /** @cvalue ULOC_VALID_LOCALE */
10    public const int VALID_LOCALE = UNKNOWN;
11
12    public const null DEFAULT_LOCALE = null;
13    /** @cvalue LOC_LANG_TAG */
14    public const string LANG_TAG = UNKNOWN;
15    /** @cvalue LOC_EXTLANG_TAG */
16    public const string EXTLANG_TAG = UNKNOWN;
17    /** @cvalue LOC_SCRIPT_TAG */
18    public const string SCRIPT_TAG = UNKNOWN;
19    /** @cvalue LOC_REGION_TAG */
20    public const string REGION_TAG = UNKNOWN;
21    /** @cvalue LOC_VARIANT_TAG */
22    public const string VARIANT_TAG = UNKNOWN;
23    /** @cvalue LOC_GRANDFATHERED_LANG_TAG */
24    public const string GRANDFATHERED_LANG_TAG = UNKNOWN;
25    /** @cvalue LOC_PRIVATE_TAG */
26    public const string PRIVATE_TAG = UNKNOWN;
27
28    /**
29     * @tentative-return-type
30     * @alias locale_get_default
31     */
32    public static function getDefault(): string {}
33
34    /**
35     * @tentative-return-type
36     * @alias locale_set_default
37     */
38    public static function setDefault(string $locale): true {}
39
40    /**
41     * @tentative-return-type
42     * @alias locale_get_primary_language
43     */
44    public static function getPrimaryLanguage(string $locale): ?string{}
45
46    /**
47     * @tentative-return-type
48     * @alias locale_get_script
49     */
50    public static function getScript(string $locale): ?string {}
51
52    /**
53     * @tentative-return-type
54     * @alias locale_get_region
55     */
56    public static function getRegion(string $locale): ?string {}
57
58    /**
59     * @return array<string, string>|false|null
60     * @tentative-return-type
61     * @alias locale_get_keywords
62     */
63    public static function getKeywords(string $locale): array|false|null {}
64
65    /**
66     * @tentative-return-type
67     * @alias locale_get_display_script
68     */
69    public static function getDisplayScript(string $locale, ?string $displayLocale = null): string|false {}
70
71    /**
72     * @tentative-return-type
73     * @alias locale_get_display_region
74     */
75    public static function getDisplayRegion(string $locale, ?string $displayLocale = null): string|false {}
76
77    /**
78     * @tentative-return-type
79     * @alias locale_get_display_name
80     */
81    public static function getDisplayName(string $locale, ?string $displayLocale = null): string|false {}
82
83    /**
84     * @tentative-return-type
85     * @alias locale_get_display_language
86     */
87    public static function getDisplayLanguage(string $locale, ?string $displayLocale = null): string|false {}
88
89    /**
90     * @tentative-return-type
91     * @alias locale_get_display_variant
92     */
93    public static function getDisplayVariant(string $locale, ?string $displayLocale = null): string|false {}
94
95    /**
96     * @tentative-return-type
97     * @alias locale_compose
98     */
99    public static function composeLocale(array $subtags): string|false {}
100
101    /**
102     * @tentative-return-type
103     * @alias locale_parse
104     */
105    public static function parseLocale(string $locale): ?array {}
106
107    /**
108     * @tentative-return-type
109     * @alias locale_get_all_variants
110     */
111    public static function getAllVariants(string $locale): ?array {}
112
113    /**
114     * @tentative-return-type
115     * @alias locale_filter_matches
116     */
117    public static function filterMatches(string $languageTag, string $locale, bool $canonicalize = false): ?bool {}
118
119    /**
120     * @tentative-return-type
121     * @alias locale_lookup
122     */
123    public static function lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null): ?string {}
124
125    /**
126     * @tentative-return-type
127     * @alias locale_canonicalize
128     */
129    public static function canonicalize(string $locale): ?string {}
130
131    /**
132     * @tentative-return-type
133     * @alias locale_accept_from_http
134     */
135    public static function acceptFromHttp(string $header): string|false {}
136}
137