1<?php
2
3/** @generate-class-entries */
4
5class Locale
6{
7    /**
8     * @tentative-return-type
9     * @alias locale_get_default
10     */
11    public static function getDefault(): string {}
12
13    /**
14     * @return bool
15     * @alias locale_set_default
16     */
17    public static function setDefault(string $locale) {} // TODO make return type void
18
19    /**
20     * @tentative-return-type
21     * @alias locale_get_primary_language
22     */
23    public static function getPrimaryLanguage(string $locale): ?string{}
24
25    /**
26     * @tentative-return-type
27     * @alias locale_get_script
28     */
29    public static function getScript(string $locale): ?string {}
30
31    /**
32     * @tentative-return-type
33     * @alias locale_get_region
34     */
35    public static function getRegion(string $locale): ?string {}
36
37    /**
38     * @return array<string, string>|false|null
39     * @tentative-return-type
40     * @alias locale_get_keywords
41     */
42    public static function getKeywords(string $locale): array|false|null {}
43
44    /**
45     * @tentative-return-type
46     * @alias locale_get_display_script
47     */
48    public static function getDisplayScript(string $locale, ?string $displayLocale = null): string|false {}
49
50    /**
51     * @tentative-return-type
52     * @alias locale_get_display_region
53     */
54    public static function getDisplayRegion(string $locale, ?string $displayLocale = null): string|false {}
55
56    /**
57     * @tentative-return-type
58     * @alias locale_get_display_name
59     */
60    public static function getDisplayName(string $locale, ?string $displayLocale = null): string|false {}
61
62    /**
63     * @tentative-return-type
64     * @alias locale_get_display_language
65     */
66    public static function getDisplayLanguage(string $locale, ?string $displayLocale = null): string|false {}
67
68    /**
69     * @tentative-return-type
70     * @alias locale_get_display_variant
71     */
72    public static function getDisplayVariant(string $locale, ?string $displayLocale = null): string|false {}
73
74    /**
75     * @tentative-return-type
76     * @alias locale_compose
77     */
78    public static function composeLocale(array $subtags): string|false {}
79
80    /**
81     * @tentative-return-type
82     * @alias locale_parse
83     */
84    public static function parseLocale(string $locale): ?array {}
85
86    /**
87     * @tentative-return-type
88     * @alias locale_get_all_variants
89     */
90    public static function getAllVariants(string $locale): ?array {}
91
92    /**
93     * @tentative-return-type
94     * @alias locale_filter_matches
95     */
96    public static function filterMatches(string $languageTag, string $locale, bool $canonicalize = false): ?bool {}
97
98    /**
99     * @tentative-return-type
100     * @alias locale_lookup
101     */
102    public static function lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null): ?string {}
103
104    /**
105     * @tentative-return-type
106     * @alias locale_canonicalize
107     */
108    public static function canonicalize(string $locale): ?string {}
109
110    /**
111     * @tentative-return-type
112     * @alias locale_accept_from_http
113     */
114    public static function acceptFromHttp(string $header): string|false {}
115}
116