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