| 1 | // DO NO EDIT! - This file was generated by /home/ubuntu/webkit/Source/JavaScriptCore/Scripts/generateIntlCanonicalizeLanguage.py |
| 2 | // language-subtag-registry file date: 2018-04-23 |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #if ENABLE(INTL) |
| 7 | |
| 8 | namespace JSC { |
| 9 | |
| 10 | static String intlPreferredLanguageTag(const String& tag) |
| 11 | { |
| 12 | // 78 possible replacements |
| 13 | if (tag == "aam" ) |
| 14 | return "aas"_s ; |
| 15 | if (tag == "adp" ) |
| 16 | return "dz"_s ; |
| 17 | if (tag == "aue" ) |
| 18 | return "ktz"_s ; |
| 19 | if (tag == "ayx" ) |
| 20 | return "nun"_s ; |
| 21 | if (tag == "bgm" ) |
| 22 | return "bcg"_s ; |
| 23 | if (tag == "bjd" ) |
| 24 | return "drl"_s ; |
| 25 | if (tag == "ccq" ) |
| 26 | return "rki"_s ; |
| 27 | if (tag == "cjr" ) |
| 28 | return "mom"_s ; |
| 29 | if (tag == "cka" ) |
| 30 | return "cmr"_s ; |
| 31 | if (tag == "cmk" ) |
| 32 | return "xch"_s ; |
| 33 | if (tag == "coy" ) |
| 34 | return "pij"_s ; |
| 35 | if (tag == "cqu" ) |
| 36 | return "quh"_s ; |
| 37 | if (tag == "drh" ) |
| 38 | return "khk"_s ; |
| 39 | if (tag == "drw" ) |
| 40 | return "prs"_s ; |
| 41 | if (tag == "gav" ) |
| 42 | return "dev"_s ; |
| 43 | if (tag == "gfx" ) |
| 44 | return "vaj"_s ; |
| 45 | if (tag == "ggn" ) |
| 46 | return "gvr"_s ; |
| 47 | if (tag == "gti" ) |
| 48 | return "nyc"_s ; |
| 49 | if (tag == "guv" ) |
| 50 | return "duz"_s ; |
| 51 | if (tag == "hrr" ) |
| 52 | return "jal"_s ; |
| 53 | if (tag == "ibi" ) |
| 54 | return "opa"_s ; |
| 55 | if (tag == "ilw" ) |
| 56 | return "gal"_s ; |
| 57 | if (tag == "in" ) |
| 58 | return "id"_s ; |
| 59 | if (tag == "iw" ) |
| 60 | return "he"_s ; |
| 61 | if (tag == "jeg" ) |
| 62 | return "oyb"_s ; |
| 63 | if (tag == "ji" ) |
| 64 | return "yi"_s ; |
| 65 | if (tag == "jw" ) |
| 66 | return "jv"_s ; |
| 67 | if (tag == "kgc" ) |
| 68 | return "tdf"_s ; |
| 69 | if (tag == "kgh" ) |
| 70 | return "kml"_s ; |
| 71 | if (tag == "koj" ) |
| 72 | return "kwv"_s ; |
| 73 | if (tag == "krm" ) |
| 74 | return "bmf"_s ; |
| 75 | if (tag == "ktr" ) |
| 76 | return "dtp"_s ; |
| 77 | if (tag == "kvs" ) |
| 78 | return "gdj"_s ; |
| 79 | if (tag == "kwq" ) |
| 80 | return "yam"_s ; |
| 81 | if (tag == "kxe" ) |
| 82 | return "tvd"_s ; |
| 83 | if (tag == "kzj" ) |
| 84 | return "dtp"_s ; |
| 85 | if (tag == "kzt" ) |
| 86 | return "dtp"_s ; |
| 87 | if (tag == "lii" ) |
| 88 | return "raq"_s ; |
| 89 | if (tag == "lmm" ) |
| 90 | return "rmx"_s ; |
| 91 | if (tag == "meg" ) |
| 92 | return "cir"_s ; |
| 93 | if (tag == "mo" ) |
| 94 | return "ro"_s ; |
| 95 | if (tag == "mst" ) |
| 96 | return "mry"_s ; |
| 97 | if (tag == "mwj" ) |
| 98 | return "vaj"_s ; |
| 99 | if (tag == "myt" ) |
| 100 | return "mry"_s ; |
| 101 | if (tag == "nad" ) |
| 102 | return "xny"_s ; |
| 103 | if (tag == "ncp" ) |
| 104 | return "kdz"_s ; |
| 105 | if (tag == "nnx" ) |
| 106 | return "ngv"_s ; |
| 107 | if (tag == "nts" ) |
| 108 | return "pij"_s ; |
| 109 | if (tag == "oun" ) |
| 110 | return "vaj"_s ; |
| 111 | if (tag == "pcr" ) |
| 112 | return "adx"_s ; |
| 113 | if (tag == "pmc" ) |
| 114 | return "huw"_s ; |
| 115 | if (tag == "pmu" ) |
| 116 | return "phr"_s ; |
| 117 | if (tag == "ppa" ) |
| 118 | return "bfy"_s ; |
| 119 | if (tag == "ppr" ) |
| 120 | return "lcq"_s ; |
| 121 | if (tag == "pry" ) |
| 122 | return "prt"_s ; |
| 123 | if (tag == "puz" ) |
| 124 | return "pub"_s ; |
| 125 | if (tag == "sca" ) |
| 126 | return "hle"_s ; |
| 127 | if (tag == "skk" ) |
| 128 | return "oyb"_s ; |
| 129 | if (tag == "tdu" ) |
| 130 | return "dtp"_s ; |
| 131 | if (tag == "thc" ) |
| 132 | return "tpo"_s ; |
| 133 | if (tag == "thx" ) |
| 134 | return "oyb"_s ; |
| 135 | if (tag == "tie" ) |
| 136 | return "ras"_s ; |
| 137 | if (tag == "tkk" ) |
| 138 | return "twm"_s ; |
| 139 | if (tag == "tlw" ) |
| 140 | return "weo"_s ; |
| 141 | if (tag == "tmp" ) |
| 142 | return "tyj"_s ; |
| 143 | if (tag == "tne" ) |
| 144 | return "kak"_s ; |
| 145 | if (tag == "tnf" ) |
| 146 | return "prs"_s ; |
| 147 | if (tag == "tsf" ) |
| 148 | return "taj"_s ; |
| 149 | if (tag == "uok" ) |
| 150 | return "ema"_s ; |
| 151 | if (tag == "xba" ) |
| 152 | return "cax"_s ; |
| 153 | if (tag == "xia" ) |
| 154 | return "acn"_s ; |
| 155 | if (tag == "xkh" ) |
| 156 | return "waw"_s ; |
| 157 | if (tag == "xsj" ) |
| 158 | return "suj"_s ; |
| 159 | if (tag == "ybd" ) |
| 160 | return "rki"_s ; |
| 161 | if (tag == "yma" ) |
| 162 | return "lrr"_s ; |
| 163 | if (tag == "ymt" ) |
| 164 | return "mtm"_s ; |
| 165 | if (tag == "yos" ) |
| 166 | return "zom"_s ; |
| 167 | if (tag == "yuu" ) |
| 168 | return "yug"_s ; |
| 169 | return String(); |
| 170 | } |
| 171 | |
| 172 | static String intlPreferredExtlangTag(const String& tag) |
| 173 | { |
| 174 | // 235 possible replacements |
| 175 | if (tag == "aao" ) |
| 176 | return "ar"_s ; |
| 177 | if (tag == "abh" ) |
| 178 | return "ar"_s ; |
| 179 | if (tag == "abv" ) |
| 180 | return "ar"_s ; |
| 181 | if (tag == "acm" ) |
| 182 | return "ar"_s ; |
| 183 | if (tag == "acq" ) |
| 184 | return "ar"_s ; |
| 185 | if (tag == "acw" ) |
| 186 | return "ar"_s ; |
| 187 | if (tag == "acx" ) |
| 188 | return "ar"_s ; |
| 189 | if (tag == "acy" ) |
| 190 | return "ar"_s ; |
| 191 | if (tag == "adf" ) |
| 192 | return "ar"_s ; |
| 193 | if (tag == "ads" ) |
| 194 | return "sgn"_s ; |
| 195 | if (tag == "aeb" ) |
| 196 | return "ar"_s ; |
| 197 | if (tag == "aec" ) |
| 198 | return "ar"_s ; |
| 199 | if (tag == "aed" ) |
| 200 | return "sgn"_s ; |
| 201 | if (tag == "aen" ) |
| 202 | return "sgn"_s ; |
| 203 | if (tag == "afb" ) |
| 204 | return "ar"_s ; |
| 205 | if (tag == "afg" ) |
| 206 | return "sgn"_s ; |
| 207 | if (tag == "ajp" ) |
| 208 | return "ar"_s ; |
| 209 | if (tag == "apc" ) |
| 210 | return "ar"_s ; |
| 211 | if (tag == "apd" ) |
| 212 | return "ar"_s ; |
| 213 | if (tag == "arb" ) |
| 214 | return "ar"_s ; |
| 215 | if (tag == "arq" ) |
| 216 | return "ar"_s ; |
| 217 | if (tag == "ars" ) |
| 218 | return "ar"_s ; |
| 219 | if (tag == "ary" ) |
| 220 | return "ar"_s ; |
| 221 | if (tag == "arz" ) |
| 222 | return "ar"_s ; |
| 223 | if (tag == "ase" ) |
| 224 | return "sgn"_s ; |
| 225 | if (tag == "asf" ) |
| 226 | return "sgn"_s ; |
| 227 | if (tag == "asp" ) |
| 228 | return "sgn"_s ; |
| 229 | if (tag == "asq" ) |
| 230 | return "sgn"_s ; |
| 231 | if (tag == "asw" ) |
| 232 | return "sgn"_s ; |
| 233 | if (tag == "auz" ) |
| 234 | return "ar"_s ; |
| 235 | if (tag == "avl" ) |
| 236 | return "ar"_s ; |
| 237 | if (tag == "ayh" ) |
| 238 | return "ar"_s ; |
| 239 | if (tag == "ayl" ) |
| 240 | return "ar"_s ; |
| 241 | if (tag == "ayn" ) |
| 242 | return "ar"_s ; |
| 243 | if (tag == "ayp" ) |
| 244 | return "ar"_s ; |
| 245 | if (tag == "bbz" ) |
| 246 | return "ar"_s ; |
| 247 | if (tag == "bfi" ) |
| 248 | return "sgn"_s ; |
| 249 | if (tag == "bfk" ) |
| 250 | return "sgn"_s ; |
| 251 | if (tag == "bjn" ) |
| 252 | return "ms"_s ; |
| 253 | if (tag == "bog" ) |
| 254 | return "sgn"_s ; |
| 255 | if (tag == "bqn" ) |
| 256 | return "sgn"_s ; |
| 257 | if (tag == "bqy" ) |
| 258 | return "sgn"_s ; |
| 259 | if (tag == "btj" ) |
| 260 | return "ms"_s ; |
| 261 | if (tag == "bve" ) |
| 262 | return "ms"_s ; |
| 263 | if (tag == "bvl" ) |
| 264 | return "sgn"_s ; |
| 265 | if (tag == "bvu" ) |
| 266 | return "ms"_s ; |
| 267 | if (tag == "bzs" ) |
| 268 | return "sgn"_s ; |
| 269 | if (tag == "cdo" ) |
| 270 | return "zh"_s ; |
| 271 | if (tag == "cds" ) |
| 272 | return "sgn"_s ; |
| 273 | if (tag == "cjy" ) |
| 274 | return "zh"_s ; |
| 275 | if (tag == "cmn" ) |
| 276 | return "zh"_s ; |
| 277 | if (tag == "coa" ) |
| 278 | return "ms"_s ; |
| 279 | if (tag == "cpx" ) |
| 280 | return "zh"_s ; |
| 281 | if (tag == "csc" ) |
| 282 | return "sgn"_s ; |
| 283 | if (tag == "csd" ) |
| 284 | return "sgn"_s ; |
| 285 | if (tag == "cse" ) |
| 286 | return "sgn"_s ; |
| 287 | if (tag == "csf" ) |
| 288 | return "sgn"_s ; |
| 289 | if (tag == "csg" ) |
| 290 | return "sgn"_s ; |
| 291 | if (tag == "csl" ) |
| 292 | return "sgn"_s ; |
| 293 | if (tag == "csn" ) |
| 294 | return "sgn"_s ; |
| 295 | if (tag == "csq" ) |
| 296 | return "sgn"_s ; |
| 297 | if (tag == "csr" ) |
| 298 | return "sgn"_s ; |
| 299 | if (tag == "czh" ) |
| 300 | return "zh"_s ; |
| 301 | if (tag == "czo" ) |
| 302 | return "zh"_s ; |
| 303 | if (tag == "doq" ) |
| 304 | return "sgn"_s ; |
| 305 | if (tag == "dse" ) |
| 306 | return "sgn"_s ; |
| 307 | if (tag == "dsl" ) |
| 308 | return "sgn"_s ; |
| 309 | if (tag == "dup" ) |
| 310 | return "ms"_s ; |
| 311 | if (tag == "ecs" ) |
| 312 | return "sgn"_s ; |
| 313 | if (tag == "esl" ) |
| 314 | return "sgn"_s ; |
| 315 | if (tag == "esn" ) |
| 316 | return "sgn"_s ; |
| 317 | if (tag == "eso" ) |
| 318 | return "sgn"_s ; |
| 319 | if (tag == "eth" ) |
| 320 | return "sgn"_s ; |
| 321 | if (tag == "fcs" ) |
| 322 | return "sgn"_s ; |
| 323 | if (tag == "fse" ) |
| 324 | return "sgn"_s ; |
| 325 | if (tag == "fsl" ) |
| 326 | return "sgn"_s ; |
| 327 | if (tag == "fss" ) |
| 328 | return "sgn"_s ; |
| 329 | if (tag == "gan" ) |
| 330 | return "zh"_s ; |
| 331 | if (tag == "gds" ) |
| 332 | return "sgn"_s ; |
| 333 | if (tag == "gom" ) |
| 334 | return "kok"_s ; |
| 335 | if (tag == "gse" ) |
| 336 | return "sgn"_s ; |
| 337 | if (tag == "gsg" ) |
| 338 | return "sgn"_s ; |
| 339 | if (tag == "gsm" ) |
| 340 | return "sgn"_s ; |
| 341 | if (tag == "gss" ) |
| 342 | return "sgn"_s ; |
| 343 | if (tag == "gus" ) |
| 344 | return "sgn"_s ; |
| 345 | if (tag == "hab" ) |
| 346 | return "sgn"_s ; |
| 347 | if (tag == "haf" ) |
| 348 | return "sgn"_s ; |
| 349 | if (tag == "hak" ) |
| 350 | return "zh"_s ; |
| 351 | if (tag == "hds" ) |
| 352 | return "sgn"_s ; |
| 353 | if (tag == "hji" ) |
| 354 | return "ms"_s ; |
| 355 | if (tag == "hks" ) |
| 356 | return "sgn"_s ; |
| 357 | if (tag == "hos" ) |
| 358 | return "sgn"_s ; |
| 359 | if (tag == "hps" ) |
| 360 | return "sgn"_s ; |
| 361 | if (tag == "hsh" ) |
| 362 | return "sgn"_s ; |
| 363 | if (tag == "hsl" ) |
| 364 | return "sgn"_s ; |
| 365 | if (tag == "hsn" ) |
| 366 | return "zh"_s ; |
| 367 | if (tag == "icl" ) |
| 368 | return "sgn"_s ; |
| 369 | if (tag == "iks" ) |
| 370 | return "sgn"_s ; |
| 371 | if (tag == "ils" ) |
| 372 | return "sgn"_s ; |
| 373 | if (tag == "inl" ) |
| 374 | return "sgn"_s ; |
| 375 | if (tag == "ins" ) |
| 376 | return "sgn"_s ; |
| 377 | if (tag == "ise" ) |
| 378 | return "sgn"_s ; |
| 379 | if (tag == "isg" ) |
| 380 | return "sgn"_s ; |
| 381 | if (tag == "isr" ) |
| 382 | return "sgn"_s ; |
| 383 | if (tag == "jak" ) |
| 384 | return "ms"_s ; |
| 385 | if (tag == "jax" ) |
| 386 | return "ms"_s ; |
| 387 | if (tag == "jcs" ) |
| 388 | return "sgn"_s ; |
| 389 | if (tag == "jhs" ) |
| 390 | return "sgn"_s ; |
| 391 | if (tag == "jls" ) |
| 392 | return "sgn"_s ; |
| 393 | if (tag == "jos" ) |
| 394 | return "sgn"_s ; |
| 395 | if (tag == "jsl" ) |
| 396 | return "sgn"_s ; |
| 397 | if (tag == "jus" ) |
| 398 | return "sgn"_s ; |
| 399 | if (tag == "kgi" ) |
| 400 | return "sgn"_s ; |
| 401 | if (tag == "knn" ) |
| 402 | return "kok"_s ; |
| 403 | if (tag == "kvb" ) |
| 404 | return "ms"_s ; |
| 405 | if (tag == "kvk" ) |
| 406 | return "sgn"_s ; |
| 407 | if (tag == "kvr" ) |
| 408 | return "ms"_s ; |
| 409 | if (tag == "kxd" ) |
| 410 | return "ms"_s ; |
| 411 | if (tag == "lbs" ) |
| 412 | return "sgn"_s ; |
| 413 | if (tag == "lce" ) |
| 414 | return "ms"_s ; |
| 415 | if (tag == "lcf" ) |
| 416 | return "ms"_s ; |
| 417 | if (tag == "liw" ) |
| 418 | return "ms"_s ; |
| 419 | if (tag == "lls" ) |
| 420 | return "sgn"_s ; |
| 421 | if (tag == "lsg" ) |
| 422 | return "sgn"_s ; |
| 423 | if (tag == "lsl" ) |
| 424 | return "sgn"_s ; |
| 425 | if (tag == "lso" ) |
| 426 | return "sgn"_s ; |
| 427 | if (tag == "lsp" ) |
| 428 | return "sgn"_s ; |
| 429 | if (tag == "lst" ) |
| 430 | return "sgn"_s ; |
| 431 | if (tag == "lsy" ) |
| 432 | return "sgn"_s ; |
| 433 | if (tag == "ltg" ) |
| 434 | return "lv"_s ; |
| 435 | if (tag == "lvs" ) |
| 436 | return "lv"_s ; |
| 437 | if (tag == "lws" ) |
| 438 | return "sgn"_s ; |
| 439 | if (tag == "lzh" ) |
| 440 | return "zh"_s ; |
| 441 | if (tag == "max" ) |
| 442 | return "ms"_s ; |
| 443 | if (tag == "mdl" ) |
| 444 | return "sgn"_s ; |
| 445 | if (tag == "meo" ) |
| 446 | return "ms"_s ; |
| 447 | if (tag == "mfa" ) |
| 448 | return "ms"_s ; |
| 449 | if (tag == "mfb" ) |
| 450 | return "ms"_s ; |
| 451 | if (tag == "mfs" ) |
| 452 | return "sgn"_s ; |
| 453 | if (tag == "min" ) |
| 454 | return "ms"_s ; |
| 455 | if (tag == "mnp" ) |
| 456 | return "zh"_s ; |
| 457 | if (tag == "mqg" ) |
| 458 | return "ms"_s ; |
| 459 | if (tag == "mre" ) |
| 460 | return "sgn"_s ; |
| 461 | if (tag == "msd" ) |
| 462 | return "sgn"_s ; |
| 463 | if (tag == "msi" ) |
| 464 | return "ms"_s ; |
| 465 | if (tag == "msr" ) |
| 466 | return "sgn"_s ; |
| 467 | if (tag == "mui" ) |
| 468 | return "ms"_s ; |
| 469 | if (tag == "mzc" ) |
| 470 | return "sgn"_s ; |
| 471 | if (tag == "mzg" ) |
| 472 | return "sgn"_s ; |
| 473 | if (tag == "mzy" ) |
| 474 | return "sgn"_s ; |
| 475 | if (tag == "nan" ) |
| 476 | return "zh"_s ; |
| 477 | if (tag == "nbs" ) |
| 478 | return "sgn"_s ; |
| 479 | if (tag == "ncs" ) |
| 480 | return "sgn"_s ; |
| 481 | if (tag == "nsi" ) |
| 482 | return "sgn"_s ; |
| 483 | if (tag == "nsl" ) |
| 484 | return "sgn"_s ; |
| 485 | if (tag == "nsp" ) |
| 486 | return "sgn"_s ; |
| 487 | if (tag == "nsr" ) |
| 488 | return "sgn"_s ; |
| 489 | if (tag == "nzs" ) |
| 490 | return "sgn"_s ; |
| 491 | if (tag == "okl" ) |
| 492 | return "sgn"_s ; |
| 493 | if (tag == "orn" ) |
| 494 | return "ms"_s ; |
| 495 | if (tag == "ors" ) |
| 496 | return "ms"_s ; |
| 497 | if (tag == "pel" ) |
| 498 | return "ms"_s ; |
| 499 | if (tag == "pga" ) |
| 500 | return "ar"_s ; |
| 501 | if (tag == "pgz" ) |
| 502 | return "sgn"_s ; |
| 503 | if (tag == "pks" ) |
| 504 | return "sgn"_s ; |
| 505 | if (tag == "prl" ) |
| 506 | return "sgn"_s ; |
| 507 | if (tag == "prz" ) |
| 508 | return "sgn"_s ; |
| 509 | if (tag == "psc" ) |
| 510 | return "sgn"_s ; |
| 511 | if (tag == "psd" ) |
| 512 | return "sgn"_s ; |
| 513 | if (tag == "pse" ) |
| 514 | return "ms"_s ; |
| 515 | if (tag == "psg" ) |
| 516 | return "sgn"_s ; |
| 517 | if (tag == "psl" ) |
| 518 | return "sgn"_s ; |
| 519 | if (tag == "pso" ) |
| 520 | return "sgn"_s ; |
| 521 | if (tag == "psp" ) |
| 522 | return "sgn"_s ; |
| 523 | if (tag == "psr" ) |
| 524 | return "sgn"_s ; |
| 525 | if (tag == "pys" ) |
| 526 | return "sgn"_s ; |
| 527 | if (tag == "rms" ) |
| 528 | return "sgn"_s ; |
| 529 | if (tag == "rsi" ) |
| 530 | return "sgn"_s ; |
| 531 | if (tag == "rsl" ) |
| 532 | return "sgn"_s ; |
| 533 | if (tag == "rsm" ) |
| 534 | return "sgn"_s ; |
| 535 | if (tag == "sdl" ) |
| 536 | return "sgn"_s ; |
| 537 | if (tag == "sfb" ) |
| 538 | return "sgn"_s ; |
| 539 | if (tag == "sfs" ) |
| 540 | return "sgn"_s ; |
| 541 | if (tag == "sgg" ) |
| 542 | return "sgn"_s ; |
| 543 | if (tag == "sgx" ) |
| 544 | return "sgn"_s ; |
| 545 | if (tag == "shu" ) |
| 546 | return "ar"_s ; |
| 547 | if (tag == "slf" ) |
| 548 | return "sgn"_s ; |
| 549 | if (tag == "sls" ) |
| 550 | return "sgn"_s ; |
| 551 | if (tag == "sqk" ) |
| 552 | return "sgn"_s ; |
| 553 | if (tag == "sqs" ) |
| 554 | return "sgn"_s ; |
| 555 | if (tag == "ssh" ) |
| 556 | return "ar"_s ; |
| 557 | if (tag == "ssp" ) |
| 558 | return "sgn"_s ; |
| 559 | if (tag == "ssr" ) |
| 560 | return "sgn"_s ; |
| 561 | if (tag == "svk" ) |
| 562 | return "sgn"_s ; |
| 563 | if (tag == "swc" ) |
| 564 | return "sw"_s ; |
| 565 | if (tag == "swh" ) |
| 566 | return "sw"_s ; |
| 567 | if (tag == "swl" ) |
| 568 | return "sgn"_s ; |
| 569 | if (tag == "syy" ) |
| 570 | return "sgn"_s ; |
| 571 | if (tag == "szs" ) |
| 572 | return "sgn"_s ; |
| 573 | if (tag == "tmw" ) |
| 574 | return "ms"_s ; |
| 575 | if (tag == "tse" ) |
| 576 | return "sgn"_s ; |
| 577 | if (tag == "tsm" ) |
| 578 | return "sgn"_s ; |
| 579 | if (tag == "tsq" ) |
| 580 | return "sgn"_s ; |
| 581 | if (tag == "tss" ) |
| 582 | return "sgn"_s ; |
| 583 | if (tag == "tsy" ) |
| 584 | return "sgn"_s ; |
| 585 | if (tag == "tza" ) |
| 586 | return "sgn"_s ; |
| 587 | if (tag == "ugn" ) |
| 588 | return "sgn"_s ; |
| 589 | if (tag == "ugy" ) |
| 590 | return "sgn"_s ; |
| 591 | if (tag == "ukl" ) |
| 592 | return "sgn"_s ; |
| 593 | if (tag == "uks" ) |
| 594 | return "sgn"_s ; |
| 595 | if (tag == "urk" ) |
| 596 | return "ms"_s ; |
| 597 | if (tag == "uzn" ) |
| 598 | return "uz"_s ; |
| 599 | if (tag == "uzs" ) |
| 600 | return "uz"_s ; |
| 601 | if (tag == "vgt" ) |
| 602 | return "sgn"_s ; |
| 603 | if (tag == "vkk" ) |
| 604 | return "ms"_s ; |
| 605 | if (tag == "vkt" ) |
| 606 | return "ms"_s ; |
| 607 | if (tag == "vsi" ) |
| 608 | return "sgn"_s ; |
| 609 | if (tag == "vsl" ) |
| 610 | return "sgn"_s ; |
| 611 | if (tag == "vsv" ) |
| 612 | return "sgn"_s ; |
| 613 | if (tag == "wbs" ) |
| 614 | return "sgn"_s ; |
| 615 | if (tag == "wuu" ) |
| 616 | return "zh"_s ; |
| 617 | if (tag == "xki" ) |
| 618 | return "sgn"_s ; |
| 619 | if (tag == "xml" ) |
| 620 | return "sgn"_s ; |
| 621 | if (tag == "xmm" ) |
| 622 | return "ms"_s ; |
| 623 | if (tag == "xms" ) |
| 624 | return "sgn"_s ; |
| 625 | if (tag == "yds" ) |
| 626 | return "sgn"_s ; |
| 627 | if (tag == "ygs" ) |
| 628 | return "sgn"_s ; |
| 629 | if (tag == "yhs" ) |
| 630 | return "sgn"_s ; |
| 631 | if (tag == "ysl" ) |
| 632 | return "sgn"_s ; |
| 633 | if (tag == "yue" ) |
| 634 | return "zh"_s ; |
| 635 | if (tag == "zib" ) |
| 636 | return "sgn"_s ; |
| 637 | if (tag == "zlm" ) |
| 638 | return "ms"_s ; |
| 639 | if (tag == "zmi" ) |
| 640 | return "ms"_s ; |
| 641 | if (tag == "zsl" ) |
| 642 | return "sgn"_s ; |
| 643 | if (tag == "zsm" ) |
| 644 | return "ms"_s ; |
| 645 | return String(); |
| 646 | } |
| 647 | |
| 648 | static String intlPreferredRegionTag(const String& tag) |
| 649 | { |
| 650 | // 6 possible replacements |
| 651 | if (tag == "BU" ) |
| 652 | return "MM"_s ; |
| 653 | if (tag == "DD" ) |
| 654 | return "DE"_s ; |
| 655 | if (tag == "FX" ) |
| 656 | return "FR"_s ; |
| 657 | if (tag == "TP" ) |
| 658 | return "TL"_s ; |
| 659 | if (tag == "YD" ) |
| 660 | return "YE"_s ; |
| 661 | if (tag == "ZR" ) |
| 662 | return "CD"_s ; |
| 663 | return String(); |
| 664 | } |
| 665 | |
| 666 | static String intlRedundantLanguageTag(const String& tag) |
| 667 | { |
| 668 | // 24 possible replacements |
| 669 | if (tag == "hy-arevela" ) |
| 670 | return "hy"_s ; |
| 671 | if (tag == "hy-arevmda" ) |
| 672 | return "hyw"_s ; |
| 673 | if (tag == "ja-Latn-hepburn-heploc" ) |
| 674 | return "ja-Latn-alalc97"_s ; |
| 675 | if (tag == "sgn-BR" ) |
| 676 | return "bzs"_s ; |
| 677 | if (tag == "sgn-CO" ) |
| 678 | return "csn"_s ; |
| 679 | if (tag == "sgn-DE" ) |
| 680 | return "gsg"_s ; |
| 681 | if (tag == "sgn-DK" ) |
| 682 | return "dsl"_s ; |
| 683 | if (tag == "sgn-ES" ) |
| 684 | return "ssp"_s ; |
| 685 | if (tag == "sgn-FR" ) |
| 686 | return "fsl"_s ; |
| 687 | if (tag == "sgn-GB" ) |
| 688 | return "bfi"_s ; |
| 689 | if (tag == "sgn-GR" ) |
| 690 | return "gss"_s ; |
| 691 | if (tag == "sgn-IE" ) |
| 692 | return "isg"_s ; |
| 693 | if (tag == "sgn-IT" ) |
| 694 | return "ise"_s ; |
| 695 | if (tag == "sgn-JP" ) |
| 696 | return "jsl"_s ; |
| 697 | if (tag == "sgn-MX" ) |
| 698 | return "mfs"_s ; |
| 699 | if (tag == "sgn-NI" ) |
| 700 | return "ncs"_s ; |
| 701 | if (tag == "sgn-NL" ) |
| 702 | return "dse"_s ; |
| 703 | if (tag == "sgn-NO" ) |
| 704 | return "nsl"_s ; |
| 705 | if (tag == "sgn-PT" ) |
| 706 | return "psr"_s ; |
| 707 | if (tag == "sgn-SE" ) |
| 708 | return "swl"_s ; |
| 709 | if (tag == "sgn-US" ) |
| 710 | return "ase"_s ; |
| 711 | if (tag == "sgn-ZA" ) |
| 712 | return "sfs"_s ; |
| 713 | if (tag == "zh-cmn-Hans" ) |
| 714 | return "cmn-Hans"_s ; |
| 715 | if (tag == "zh-cmn-Hant" ) |
| 716 | return "cmn-Hant"_s ; |
| 717 | return String(); |
| 718 | } |
| 719 | |
| 720 | static String intlGrandfatheredLanguageTag(const String& tag) |
| 721 | { |
| 722 | // 26 possible replacements |
| 723 | if (tag == "art-lojban" ) |
| 724 | return "jbo"_s ; |
| 725 | if (tag == "cel-gaulish" ) |
| 726 | return "cel-gaulish"_s ; |
| 727 | if (tag == "en-gb-oed" ) |
| 728 | return "en-GB-oxendict"_s ; |
| 729 | if (tag == "i-ami" ) |
| 730 | return "ami"_s ; |
| 731 | if (tag == "i-bnn" ) |
| 732 | return "bnn"_s ; |
| 733 | if (tag == "i-default" ) |
| 734 | return "i-default"_s ; |
| 735 | if (tag == "i-enochian" ) |
| 736 | return "i-enochian"_s ; |
| 737 | if (tag == "i-hak" ) |
| 738 | return "hak"_s ; |
| 739 | if (tag == "i-klingon" ) |
| 740 | return "tlh"_s ; |
| 741 | if (tag == "i-lux" ) |
| 742 | return "lb"_s ; |
| 743 | if (tag == "i-mingo" ) |
| 744 | return "i-mingo"_s ; |
| 745 | if (tag == "i-navajo" ) |
| 746 | return "nv"_s ; |
| 747 | if (tag == "i-pwn" ) |
| 748 | return "pwn"_s ; |
| 749 | if (tag == "i-tao" ) |
| 750 | return "tao"_s ; |
| 751 | if (tag == "i-tay" ) |
| 752 | return "tay"_s ; |
| 753 | if (tag == "i-tsu" ) |
| 754 | return "tsu"_s ; |
| 755 | if (tag == "no-bok" ) |
| 756 | return "nb"_s ; |
| 757 | if (tag == "no-nyn" ) |
| 758 | return "nn"_s ; |
| 759 | if (tag == "sgn-be-fr" ) |
| 760 | return "sfb"_s ; |
| 761 | if (tag == "sgn-be-nl" ) |
| 762 | return "vgt"_s ; |
| 763 | if (tag == "sgn-ch-de" ) |
| 764 | return "sgg"_s ; |
| 765 | if (tag == "zh-guoyu" ) |
| 766 | return "cmn"_s ; |
| 767 | if (tag == "zh-hakka" ) |
| 768 | return "hak"_s ; |
| 769 | if (tag == "zh-min" ) |
| 770 | return "zh-min"_s ; |
| 771 | if (tag == "zh-min-nan" ) |
| 772 | return "nan"_s ; |
| 773 | if (tag == "zh-xiang" ) |
| 774 | return "hsn"_s ; |
| 775 | return String(); |
| 776 | } |
| 777 | |
| 778 | } // namespace JSC |
| 779 | |
| 780 | #endif // ENABLE(INTL) |
| 781 | |
| 782 | |