Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlocale.qdoc
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3// Qt-Security score:insignificant reason:docs
4
5/*!
6 \class QLocale
7 \inmodule QtCore
8 \brief The QLocale class converts between numbers and their
9 string representations in various languages.
10
11 \compares equality
12 \reentrant
13 \ingroup i18n
14 \ingroup string-processing
15 \ingroup shared
16
17 QLocale is constructed for a specified language, optional script and
18 territory. It offers various facilities for formatting data as text,
19 localized appropriately, and for reading data out of localized text.
20
21 Example:
22
23 \snippet code/src_corelib_text_qlocale.cpp 0
24
25 QLocale supports the concept of a default locale, which is
26 determined from the system's locale settings at application
27 startup. The default locale can be changed by calling the
28 static member setDefault(). Setting the default locale has the
29 following effects:
30
31 \list
32 \li If a QLocale object is constructed with the default constructor,
33 it will use the default locale's settings.
34 \li QString::arg() uses the default locale to format a number when
35 its position specifier in the format string contains an 'L',
36 e.g. "%L1".
37 \endlist
38
39 The following example illustrates how to use QLocale directly:
40
41 \snippet code/src_corelib_text_qlocale.cpp 1
42
43 An alternative method for constructing a QLocale object is by
44 specifying the locale name.
45
46 \snippet code/src_corelib_text_qlocale.cpp 2
47
48 This constructor reads the language, script and/or territory from the given
49 name, accepting either underscore or dash as separator (and ignoring any
50 trailing \c{.codeset} or \c{@variant} suffix).
51
52 \note For the current keyboard input locale take a look at
53 QInputMethod::locale().
54
55 \section1 Appropriateness of the formats
56
57 QLocale's data is based on Common Locale Data Repository v48.2.
58
59 This data is published by The Unicode Consortium, who aim to follow
60 customary, common use by writers of each language, in each script, in each
61 territory for which data is given. This may in some cases differ from what
62 is recognized as official, depending on how widely that official standard is
63 followed in practice.
64
65 For example, although the relevant international standard (from the BIPM)
66 mandates a thin non-breaking space as the separator between groups of digits
67 in numbers, when they are split up to aid readability, and many
68 jurisdictions have adopted this as their official standard for the
69 formatting of numbers, many locales in fact have a traditional way of
70 formatting numbers with punctuators separating groups of digits. CLDR, and
71 thus QLocale, follows this common usage rather than the official standard.
72
73 \section1 Matching combinations of language, script and territory
74
75 QLocale has data, derived from CLDR, for many combinations of language,
76 script and territory, but not all. If it is constructed with all three of
77 these key values specified (treating \c AnyLanguage, \c AnyScript or \c
78 AnyTerritory as unspecified) and QLocale has data for the given combination,
79 this data is used. Otherwise, QLocale does its best to find a sensible
80 combination of language, script and territory, for which it does have data,
81 that matches those that were specified.
82
83 The CLDR provides tables of likely combinations, which are used to fill in
84 any unspecified key or keys; if QLocale has data for the result of such a
85 likely combination, that is used. If no language is specified, and none can
86 be determined from script and territory, or if QLocale has no data for the
87 language, the "C" locale (when reading the keys from a string) or default
88 locale (otherwise) is used.
89
90 When QLocale has no data for the keys specified, with likely keys filled in
91 where unspecified, but does have data for the resulting language, a
92 fall-back is sought, based on ignoring either territory, script or both (in
93 that order). This results in a QLocale which may not match what was asked
94 for, but provides localization that's as suitable as the available data
95 permits, for the keys specified.
96
97 Use language(), script() and territory() to determine the actual keys used.
98
99 \sa QString::arg(), QInputMethod::locale()
100*/
101
102/*!
103 \enum QLocale::Language
104
105 This enumerated type is used to specify a language.
106
107 \value AnyLanguage
108 \value C A simplified English locale; see QLocale::c()
109
110 \value Abkhazian
111 \value Afan Obsolete, please use Oromo
112 \value Afar
113 \value Afrikaans
114 \value Aghem
115 \value Akan
116 \value [since 5.1] Akkadian
117 \value [since 5.3] Akoose
118 \value Albanian
119 \value [since 5.7] AmericanSignLanguage
120 \value Amharic
121 \value [since 5.1] AncientEgyptian
122 \value [since 5.1] AncientGreek
123 \value [since 6.7] Anii
124 \value Arabic
125 \value [since 5.1] Aragonese
126 \value [since 5.1] Aramaic
127 \value Armenian
128 \value Assamese
129 \value Asturian
130 \value Asu
131 \value Atsam
132 \value Avaric
133 \value Avestan
134 \value Aymara
135 \value Azerbaijani
136 \value Bafia
137 \value [since 5.1] Balinese
138 \value [since 6.6] Baluchi
139 \value Bambara
140 \value [since 5.1] Bamun
141 \value [since 6.0] Bangla
142 \value Basaa
143 \value Bashkir
144 \value Basque
145 \value [since 5.1] BatakToba
146 \value Belarusian
147 \value Bemba
148 \value Bena
149 \value Bengali Obsolete, please use Bangla
150 \value [since 5.7] Bhojpuri
151 \value Bhutani Obsolete, please use Dzongkha
152 \value Bislama
153 \value Blin
154 \value Bodo
155 \value Bosnian
156 \value Breton
157 \value [since 5.1] Buginese
158 \value Bulgarian
159 \value Burmese
160 \value Byelorussian Obsolete, please use Belarusian
161 \value Cambodian Obsolete, please use Khmer
162 \value [since 5.7] Cantonese
163 \value Catalan
164 \value [since 5.14] Cebuano
165 \value [since 6.0] CentralAtlasTamazight
166 \value [since 5.5] CentralKurdish
167 \value CentralMoroccoTamazight Obsolete, please use CentralAtlasTamazight
168 \value [since 5.1] Chakma
169 \value Chamorro
170 \value Chechen
171 \value Cherokee
172 \value Chewa Obsolete, please use Nyanja
173 \value [since 5.14] Chickasaw
174 \value Chiga
175 \value Chinese (Mandarin)
176 \value Church
177 \value Chuvash
178 \value Colognian
179 \value [since 5.1] Coptic
180 \value Cornish
181 \value Corsican
182 \value Cree
183 \value Croatian
184 \value Czech
185 \value Danish
186 \value Divehi
187 \value [since 5.1] Dogri
188 \value Duala
189 \value Dutch
190 \value Dzongkha
191 \value Embu
192 \value English
193 \value [since 5.14] Erzya
194 \value Esperanto
195 \value Estonian
196 \value Ewe
197 \value Ewondo
198 \value Faroese
199 \value Fijian
200 \value Filipino
201 \value Finnish
202 \value French
203 \value Frisian same as WesternFrisian
204 \value Friulian
205 \value [since 6.13] Fula
206 \value Fulah Obsolete, please use \c Fula
207 \value Ga
208 \value Gaelic
209 \value Galician
210 \value Ganda
211 \value Geez
212 \value Georgian
213 \value German
214 \value [since 5.1] Gothic
215 \value Greek
216 \value Greenlandic Obsolete, please use Kalaallisut
217 \value Guarani
218 \value Gujarati
219 \value Gusii
220 \value Haitian
221 \value [since 6.5] Haryanvi
222 \value Hausa
223 \value Hawaiian
224 \value Hebrew
225 \value Herero
226 \value Hindi
227 \value HiriMotu
228 \value Hungarian
229 \value Icelandic
230 \value [since 5.12] Ido
231 \value Igbo
232 \value [since 5.5] InariSami
233 \value Indonesian
234 \value [since 5.1] Ingush
235 \value Interlingua
236 \value Interlingue
237 \value Inuktitut
238 \value Inupiak Obsolete, please use Inupiaq
239 \value [since 6.0] Inupiaq
240 \value Irish
241 \value Italian
242 \value Japanese
243 \value Javanese
244 \value Jju
245 \value JolaFonyi
246 \value Kabuverdianu
247 \value Kabyle
248 \value [since 6.3] Kaingang
249 \value Kako
250 \value [since 6.0] Kalaallisut
251 \value Kalenjin
252 \value Kamba
253 \value [since 6.7] Kangri
254 \value Kannada
255 \value Kanuri
256 \value [since 6.9] KaraKalpak
257 \value Kashmiri
258 \value Kazakh
259 \value [since 5.5] Kenyang
260 \value Khmer
261 \value [since 5.5] Kiche
262 \value Kikuyu
263 \value Kinyarwanda
264 \value Kirghiz Obsolete, please use Kyrgyz
265 \value Komi
266 \value Kongo
267 \value Konkani
268 \value Korean
269 \value Koro
270 \value KoyraboroSenni
271 \value KoyraChiini
272 \value Kpelle
273 \value [since 6.0] Kuanyama
274 \value Kurdish
275 \value Kurundi Obsolete, please use Rundi
276 \value [since 6.8] Kuvi
277 \value Kwanyama Obsolete, please use Kuanyama
278 \value Kwasio
279 \value [since 6.0] Kyrgyz
280 \value [since 6.11] Ladin
281 \value [since 5.3] Lakota
282 \value Langi
283 \value Lao
284 \value Latin
285 \value Latvian
286 \value [since 5.5] Lezghian
287 \value Limburgish
288 \value Lingala
289 \value [since 6.6] Ligurian
290 \value [since 5.7] LiteraryChinese
291 \value Lithuanian
292 \value [since 5.12] Lojban
293 \value [since 5.5] LowerSorbian
294 \value LowGerman
295 \value LubaKatanga
296 \value [since 5.5] LuleSami
297 \value Luo
298 \value Luxembourgish
299 \value Luyia
300 \value Macedonian
301 \value Machame
302 \value [since 5.5] Maithili
303 \value MakhuwaMeetto
304 \value Makonde
305 \value Malagasy
306 \value Malay
307 \value Malayalam
308 \value Maltese
309 \value [since 5.1] Mandingo
310 \value [since 5.1] Manipuri
311 \value Manx
312 \value Maori
313 \value [since 5.5] Mapuche
314 \value Marathi
315 \value Marshallese
316 \value Masai
317 \value [since 5.7] Mazanderani
318 \value [since 5.5] Mende
319 \value Meru
320 \value Meta
321 \value [since 5.5] Mohawk
322 \value [since 6.5] Moksha
323 \value Mongolian
324 \value Morisyen
325 \value Mundang
326 \value [since 5.14] Muscogee
327 \value Nama
328 \value NauruLanguage
329 \value Navaho Obsolete, please use Navajo
330 \value [since 6.0] Navajo
331 \value Ndonga
332 \value Nepali
333 \value [since 5.7] Newari
334 \value Ngiemboon
335 \value [since 6.3] Nheengatu
336 \value [since 6.0] NigerianPidgin
337 \value Ngomba
338 \value [since 5.5] Nko
339 \value [since 6.5] NorthernFrisian
340 \value [since 5.7] NorthernLuri
341 \value NorthernSami
342 \value NorthernSotho
343 \value NorthNdebele
344 \value NorwegianBokmal
345 \value NorwegianNynorsk
346 \value Nuer
347 \value Nyanja
348 \value Nyankole
349 \value [since 6.5] Obolo
350 \value Occitan
351 \value [since 6.0] Odia
352 \value Ojibwa
353 \value [since 5.1] OldIrish
354 \value [since 5.1] OldNorse
355 \value [since 5.1] OldPersian
356 \value Oriya Obsolete, please use Odia
357 \value Oromo
358 \value [since 5.7] Osage
359 \value Ossetic
360 \value [since 5.1] Pahlavi
361 \value [since 5.7] Palauan
362 \value Pali
363 \value [since 5.7] Papiamento
364 \value Pashto
365 \value Persian
366 \value [since 5.1] Phoenician
367 \value [since 6.5] Pijin
368 \value Polish
369 \value Portuguese
370 \value [since 5.5] Prussian
371 \value Punjabi
372 \value [since 6.13] Qeqchi for the Qʼeqchiʼ language
373 \value Quechua
374 \value [since 6.5] Rajasthani
375 \value RhaetoRomance Obsolete, please use Romansh
376 \value [since 6.6] Rohingya
377 \value Romanian
378 \value Romansh
379 \value Rombo
380 \value Rundi
381 \value Russian
382 \value Rwa
383 \value Saho
384 \value Sakha Obsolete, please use \c Yakut
385 \value Samburu
386 \value Samoan
387 \value Sango
388 \value Sangu
389 \value Sanskrit
390 \value [since 5.1] Santali
391 \value Sardinian
392 \value [since 5.1] Saurashtra Obsolete, please use \c Sourashtra
393 \value Sena
394 \value Serbian
395 \value Shambala
396 \value [since 6.11] Shan
397 \value Shona
398 \value SichuanYi
399 \value [since 5.12] Sicilian
400 \value Sidamo
401 \value [since 5.14] Silesian
402 \value Sindhi
403 \value Sinhala
404 \value [since 5.5] SkoltSami
405 \value Slovak
406 \value Slovenian
407 \value Soga
408 \value Somali
409 \value [since 6.13] Sourashtra
410 \value [since 5.12] SouthernKurdish
411 \value [since 5.5] SouthernSami
412 \value SouthernSotho
413 \value SouthNdebele
414 \value Spanish
415 \value [since 5.3] StandardMoroccanTamazight
416 \value Sundanese
417 \value Swahili
418 \value [since 6.9] SwampyCree
419 \value Swati
420 \value Swedish
421 \value SwissGerman
422 \value Syriac
423 \value Tachelhit
424 \value Tahitian
425 \value [since 5.1] TaiDam
426 \value Taita
427 \value Tajik
428 \value Tamil
429 \value Taroko
430 \value Tasawaq
431 \value Tatar
432 \value Telugu
433 \value Teso
434 \value Thai
435 \value Tibetan
436 \value Tigre
437 \value Tigrinya
438 \value [since 5.7] TokelauLanguage
439 \value [since 6.5] TokiPona
440 \value [since 5.7] TokPisin
441 \value Tongan
442 \value [since 6.6] Torwali
443 \value Tsonga
444 \value Tswana
445 \value Turkish
446 \value Turkmen
447 \value [since 5.7] TuvaluLanguage
448 \value [since 6.13] Tuvinian
449 \value Tyap
450 \value [since 5.1] Ugaritic
451 \value Uighur Obsolete, please use Uyghur
452 \value Uigur Obsolete, please use Uyghur
453 \value Ukrainian
454 \value [since 5.5] UpperSorbian
455 \value Urdu
456 \value [since 6.0] Uyghur
457 \value Uzbek
458 \value Vai
459 \value Venda
460 \value [since 6.7] Venetian
461 \value Vietnamese
462 \value Volapuk
463 \value Vunjo
464 \value Walamo Obsolete, please use Wolaytta
465 \value Walloon
466 \value Walser
467 \value [since 5.5] Warlpiri
468 \value Welsh
469 \value [since 5.12] WesternBalochi
470 \value WesternFrisian same as Frisian
471 \value [since 6.0] Wolaytta
472 \value Wolof
473 \value Xhosa
474 \value Yangben
475 \value [since 6.13] Yakut
476 \value Yiddish
477 \value Yoruba
478 \value Zarma
479 \value Zhuang
480 \value Zulu
481
482 \omitvalue LastLanguage
483
484 \sa language(), languageToString()
485*/
486
487/*!
488 \typealias QLocale::Territory
489
490 This enumeration type is an alias for \l Country,
491 which shall be renamed to Territory at a future release.
492
493 \sa territory(), territoryToString()
494*/
495
496/*!
497 \enum QLocale::Country
498
499 This enumerated type is used to identify a territory.
500
501 An individual territory may be a province of a country, a country (by far the
502 most common case) or a larger geographic entity, to which some localization
503 details are specific.
504
505 \value AnyCountry Obsolete alias for \c AnyTerritory
506 \value [since 6.2] AnyTerritory
507
508 \value Afghanistan
509 \value AlandIslands
510 \value Albania
511 \value Algeria
512 \value AmericanSamoa
513 \value Andorra
514 \value Angola
515 \value Anguilla
516 \value Antarctica
517 \value AntiguaAndBarbuda
518 \value Argentina
519 \value Armenia
520 \value Aruba
521 \value AscensionIsland
522 \value Australia
523 \value Austria
524 \value Azerbaijan
525 \value Bahamas
526 \value Bahrain
527 \value Bangladesh
528 \value Barbados
529 \value Belarus
530 \value Belgium
531 \value Belize
532 \value Benin
533 \value Bermuda
534 \value Bhutan
535 \value Bolivia
536 \value Bonaire
537 \value BosniaAndHerzegowina Obsolete, use \c BosniaAndHerzegovina instead
538 \value [since 6.0] BosniaAndHerzegovina
539 \value Botswana
540 \value BouvetIsland
541 \value Brazil
542 \value BritishIndianOceanTerritory
543 \value BritishVirginIslands
544 \value Brunei
545 \value Bulgaria
546 \value BurkinaFaso
547 \value Burundi
548 \value Cambodia
549 \value Cameroon
550 \value Canada
551 \value CanaryIslands
552 \value CaribbeanNetherlands
553 \value CapeVerde
554 \value CaymanIslands
555 \value CentralAfricanRepublic
556 \value CeutaAndMelilla
557 \value Chad
558 \value Chile
559 \value China
560 \value ChristmasIsland
561 \value ClippertonIsland
562 \value CocosIslands
563 \value Colombia
564 \value Comoros
565 \value CongoBrazzaville
566 \value CongoKinshasa
567 \value CookIslands
568 \value CostaRica
569 \value Croatia
570 \value Cuba
571 \value [since 6.0] Curacao
572 \value CuraSao Obsolete, use \c Curacao instead
573 \value Cyprus
574 \value [since 6.0] Czechia
575 \value CzechRepublic Obsolete, use \c Czechia instead
576 \value DemocraticRepublicOfCongo Obsolete, use \c CongoKinshasa instead
577 \value DemocraticRepublicOfKorea Obsolete, use \c NorthKorea instead
578 \value Denmark
579 \value DiegoGarcia
580 \value Djibouti
581 \value Dominica
582 \value DominicanRepublic
583 \value EastTimor
584 \value Ecuador
585 \value Egypt
586 \value ElSalvador
587 \value EquatorialGuinea
588 \value Eritrea
589 \value Estonia
590 \value Eswatini
591 \value Ethiopia
592 \value [since 5.7] EuropeanUnion
593 \value [since 5.12] Europe
594 \value FalklandIslands
595 \value FaroeIslands
596 \value Fiji
597 \value Finland
598 \value France
599 \value FrenchGuiana
600 \value FrenchPolynesia
601 \value [since 6.13] FrenchSouthernAndAntarcticLands
602 \value FrenchSouthernTerritories Obsolete, please use \c FrenchSouthernAndAntarcticLands
603 \value Gabon
604 \value Gambia
605 \value Georgia
606 \value Germany
607 \value Ghana
608 \value Gibraltar
609 \value Greece
610 \value Greenland
611 \value Grenada
612 \value Guadeloupe
613 \value Guam
614 \value Guatemala
615 \value Guernsey
616 \value Guinea
617 \value GuineaBissau
618 \value Guyana
619 \value Haiti
620 \value HeardAndMcDonaldIslands Obsolete, please use \c HeardIslandAndMcDonaldIslands
621 \value [since 6.13] HeardIslandAndMcDonaldIslands
622 \value Honduras
623 \value HongKong
624 \value Hungary
625 \value Iceland
626 \value India
627 \value Indonesia
628 \value Iran
629 \value Iraq
630 \value Ireland
631 \value IsleOfMan
632 \value Israel
633 \value Italy
634 \value IvoryCoast
635 \value Jamaica
636 \value Japan
637 \value Jersey
638 \value Jordan
639 \value Kazakhstan
640 \value Kenya
641 \value Kiribati
642 \value [since 5.2] Kosovo
643 \value Kuwait
644 \value Kyrgyzstan
645 \value Laos
646 \value LatinAmerica
647 \value LatinAmericaAndTheCaribbean Obsolete, use \c LatinAmerica instead
648 \value Latvia
649 \value Lebanon
650 \value Lesotho
651 \value Liberia
652 \value Libya
653 \value Liechtenstein
654 \value Lithuania
655 \value Luxembourg
656 \value Macao
657 \value Macau
658 \value Macedonia
659 \value Madagascar
660 \value Malawi
661 \value Malaysia
662 \value Maldives
663 \value Mali
664 \value Malta
665 \value MarshallIslands
666 \value Martinique
667 \value Mauritania
668 \value Mauritius
669 \value Mayotte
670 \value Mexico
671 \value Micronesia
672 \value Moldova
673 \value Monaco
674 \value Mongolia
675 \value Montenegro
676 \value Montserrat
677 \value Morocco
678 \value Mozambique
679 \value Myanmar
680 \value Namibia
681 \value NauruCountry Obsolete alias for \c NauruTerritory
682 \value [since 6.2] NauruTerritory
683 \value Nepal
684 \value Netherlands
685 \value NewCaledonia
686 \value NewZealand
687 \value Nicaragua
688 \value Niger
689 \value Nigeria
690 \value Niue
691 \value NorfolkIsland
692 \value NorthernMarianaIslands
693 \value NorthKorea
694 \value Norway
695 \value Oman
696 \value [since 5.7] OutlyingOceania
697 \value Pakistan
698 \value Palau
699 \value PalestinianTerritories
700 \value Panama
701 \value PapuaNewGuinea
702 \value Paraguay
703 \value PeoplesRepublicOfCongo Obsolete, use \c CongoBrazzaville instead
704 \value Peru
705 \value Philippines
706 \value Pitcairn
707 \value Poland
708 \value Portugal
709 \value PuertoRico
710 \value Qatar
711 \value RepublicOfKorea Obsolete, use \c SouthKorea instead
712 \value Reunion
713 \value Romania
714 \value RussianFederation
715 \value Russia
716 \value Rwanda
717 \value SaintBarthelemy
718 \value SaintHelena
719 \value SaintKittsAndNevis
720 \value SaintLucia
721 \value SaintMartin
722 \value SaintPierreAndMiquelon
723 \value SaintVincentAndGrenadines
724 \value SaintVincentAndTheGrenadines
725 \value Samoa
726 \value SanMarino
727 \value SaoTomeAndPrincipe
728 \value SaudiArabia
729 \value Senegal
730 \value Serbia
731 \value Seychelles
732 \value SierraLeone
733 \value Singapore
734 \value SintMaarten
735 \value Slovakia
736 \value Slovenia
737 \value SolomonIslands
738 \value Somalia
739 \value SouthAfrica
740 \value SouthGeorgiaAndSouthSandwichIslands
741 \value SouthGeorgiaAndTheSouthSandwichIslands
742 \value SouthKorea
743 \value SouthSudan
744 \value Spain
745 \value SriLanka
746 \value Sudan
747 \value Suriname
748 \value SvalbardAndJanMayen
749 \value SvalbardAndJanMayenIslands
750 \value Swaziland
751 \value Sweden
752 \value Switzerland
753 \value Syria
754 \value SyrianArabRepublic Obsolete, use \c Syria instead
755 \value Taiwan
756 \value Tajikistan
757 \value Tanzania
758 \value Thailand
759 \value TimorLeste
760 \value Togo
761 \value TokelauCountry Obsolete alias for \c TokelauTerritory
762 \value [since 6.2] TokelauTerritory
763 \value Tonga
764 \value TrinidadAndTobago
765 \value TristanDaCunha
766 \value Tunisia
767 \value Turkey Obsolete, please use \c Turkiye
768 \value [since 6.13] Turkiye
769 \value Turkmenistan
770 \value TurksAndCaicosIslands
771 \value TuvaluCountry Obsolete alias for \c TuvaluTerritory
772 \value [since 6.2] TuvaluTerritory
773 \value Uganda
774 \value Ukraine
775 \value UnitedArabEmirates
776 \value UnitedKingdom
777 \value UnitedStates
778 \value UnitedStatesOutlyingIslands
779 \value UnitedStatesMinorOutlyingIslands
780 \value UnitedStatesVirginIslands
781 \value Uruguay
782 \value Uzbekistan
783 \value Vanuatu
784 \value VaticanCity
785 \value VaticanCityState
786 \value Venezuela
787 \value Vietnam
788 \value WallisAndFutuna
789 \value WallisAndFutunaIslands
790 \value WesternSahara
791 \value [since 5.12] World
792 \value Yemen
793 \value Zambia
794 \value Zimbabwe
795
796 \omitvalue LastCountry Osbolete alias for \c LastTerritory
797 \omitvalue LastTerritory
798
799 \note Use the Territory alias for this enumeration where possible.
800 The Country enum shall be renamed to Territory at a later release.
801
802 \sa territory(), territoryToString(), codeToTerritory(), territoryToCode()
803*/
804
805/*!
806 \enum QLocale::Script
807
808 This enumerated type is used to specify a script.
809
810 \value AnyScript
811
812 \value [since 5.7] AdlamScript
813 \value [since 5.7] AhomScript
814 \value [since 5.7] AnatolianHieroglyphsScript
815 \value ArabicScript
816 \value ArmenianScript
817 \value [since 5.1] AvestanScript
818 \value [since 5.1] BalineseScript
819 \value [since 5.1] BamumScript
820 \value [since 6.0] BanglaScript
821 \value [since 5.5] BassaVahScript
822 \value [since 5.1] BatakScript
823 \value BengaliScript Obsolete, please use BanglaScript
824 \value [since 5.7] BhaiksukiScript
825 \value [since 5.1] BopomofoScript
826 \value [since 5.1] BrahmiScript
827 \value [since 5.1] BrailleScript
828 \value [since 5.1] BugineseScript
829 \value [since 5.1] BuhidScript
830 \value [since 5.1] CanadianAboriginalScript
831 \value [since 5.1] CarianScript
832 \value [since 5.5] CaucasianAlbanianScript
833 \value [since 5.1] ChakmaScript
834 \value [since 5.1] ChamScript
835 \value CherokeeScript
836 \value [since 5.1] CopticScript
837 \value [since 5.1] CuneiformScript
838 \value [since 5.1] CypriotScript
839 \value CyrillicScript
840 \value [since 5.1] DeseretScript
841 \value DevanagariScript
842 \value [since 5.5] DuployanScript
843 \value [since 5.1] EgyptianHieroglyphsScript
844 \value [since 5.5] ElbasanScript
845 \value EthiopicScript
846 \value [since 5.1] FraserScript
847 \value GeorgianScript
848 \value [since 5.1] GlagoliticScript
849 \value [since 5.1] GothicScript
850 \value [since 5.5] GranthaScript
851 \value GreekScript
852 \value GujaratiScript
853 \value GurmukhiScript
854 \value [since 5.1] HangulScript
855 \value [since 6.6] HanifiScript
856 \value [since 5.1] HanScript
857 \value [since 5.1] HanunooScript
858 \value [since 5.7] HanWithBopomofoScript
859 \value [since 5.7] HatranScript
860 \value HebrewScript
861 \value [since 5.1] HiraganaScript
862 \value [since 5.1] ImperialAramaicScript
863 \value [since 5.1] InscriptionalPahlaviScript
864 \value [since 5.1] InscriptionalParthianScript
865 \value [since 5.7] JamoScript
866 \value JapaneseScript
867 \value [since 5.1] JavaneseScript
868 \value [since 5.1] KaithiScript
869 \value KannadaScript
870 \value [since 5.1] KatakanaScript
871 \value [since 5.1] KayahLiScript
872 \value [since 5.1] KharoshthiScript
873 \value [since 5.1] KhmerScript
874 \value [since 5.5] KhojkiScript
875 \value [since 5.5] KhudawadiScript
876 \value KoreanScript
877 \value [since 5.1] LannaScript
878 \value LaoScript
879 \value LatinScript
880 \value [since 5.1] LepchaScript
881 \value [since 5.1] LimbuScript
882 \value [since 5.5] LinearAScript
883 \value [since 5.1] LinearBScript
884 \value [since 5.1] LycianScript
885 \value [since 5.1] LydianScript
886 \value [since 5.5] MahajaniScript
887 \value MalayalamScript
888 \value [since 5.1] MandaeanScript
889 \value [since 5.5] ManichaeanScript
890 \value [since 5.7] MarchenScript
891 \value [since 5.1] MeiteiMayekScript
892 \value [since 6.0] MendeScript
893 \value MendeKikakuiScript Obsolete, please use MendeScript
894 \value [since 5.1] MeroiticCursiveScript
895 \value [since 5.1] MeroiticScript
896 \value [since 5.5] ModiScript
897 \value MongolianScript
898 \value [since 5.5] MroScript
899 \value [since 5.7] MultaniScript
900 \value MyanmarScript
901 \value [since 5.5] NabataeanScript
902 \value [since 5.7] NewaScript
903 \value [since 5.1] NewTaiLueScript
904 \value [since 5.1] NkoScript
905 \value [since 5.1] OghamScript
906 \value [since 5.1] OlChikiScript
907 \value [since 5.7] OldHungarianScript
908 \value [since 5.1] OldItalicScript
909 \value [since 5.5] OldNorthArabianScript
910 \value [since 5.5] OldPermicScript
911 \value [since 5.1] OldPersianScript
912 \value [since 5.1] OldSouthArabianScript
913 \value [since 6.0] OdiaScript
914 \value OriyaScript Obsolete, please use OdiaScript
915 \value [since 5.1] OrkhonScript
916 \value [since 5.7] OsageScript
917 \value [since 5.1] OsmanyaScript
918 \value [since 5.5] PahawhHmongScript
919 \value [since 5.5] PalmyreneScript
920 \value [since 5.5] PauCinHauScript
921 \value [since 5.1] PhagsPaScript
922 \value [since 5.1] PhoenicianScript
923 \value [since 5.1] PollardPhoneticScript
924 \value [since 5.5] PsalterPahlaviScript
925 \value [since 5.1] RejangScript
926 \value [since 5.1] RunicScript
927 \value [since 5.1] SamaritanScript
928 \value [since 5.1] SaurashtraScript Obsolete, please use \c SourashtraScript
929 \value [since 5.1] SharadaScript
930 \value [since 5.1] ShavianScript
931 \value [since 5.5] SiddhamScript
932 \value [since 5.7] SignWritingScript
933 \value SimplifiedChineseScript same as SimplifiedHanScript
934 \value SimplifiedHanScript same as SimplifiedChineseScript
935 \value SinhalaScript
936 \value [since 5.1] SoraSompengScript
937 \value [since 6.13] SourashtraScript
938 \value [since 5.1] SundaneseScript
939 \value [since 5.1] SylotiNagriScript
940 \value SyriacScript
941 \value [since 5.1] TagalogScript
942 \value [since 5.1] TagbanwaScript
943 \value [since 5.1] TaiLeScript
944 \value [since 5.1] TaiVietScript
945 \value [since 5.1] TakriScript
946 \value TamilScript
947 \value [since 5.7] TangutScript
948 \value TeluguScript
949 \value ThaanaScript
950 \value ThaiScript
951 \value TibetanScript
952 \value TifinaghScript
953 \value [since 5.5] TirhutaScript
954 \value TraditionalChineseScript same as TraditionalHanScript
955 \value TraditionalHanScript same as TraditionalChineseScript
956 \value [since 5.1] UgariticScript
957 \value VaiScript
958 \value [since 5.5] VarangKshitiScript
959 \value YiScript
960
961 \omitvalue LastScript
962
963 \sa script(), scriptToString(), languageToString()
964*/
965
966/*!
967 \enum QLocale::FormatType
968
969 This enum describes the different formats that can be used when
970 converting QDate, QTime, and QDateTime objects, as well
971 as months and days, to strings specific to the locale.
972
973 \value LongFormat Longer format.
974
975 \value ShortFormat Shorter format.
976
977 \value NarrowFormat A special version for use when space is very limited.
978
979 \note \c NarrowFormat might contain the same text for
980 different months and days. It can even be an empty string if the
981 locale doesn't support narrow names, so you should avoid using it
982 for date formatting. Also, for the system locale this format is
983 the same as \c ShortFormat.
984
985 \sa dateFormat(), timeFormat(), dateTimeFormat()
986 \sa monthName(), standaloneMonthName(), dayName(), standaloneDayName()
987 \sa toDate(), toTime(), toDateTime()
988*/
989
990/*!
991 \enum QLocale::NumberOption
992
993 This enum defines a set of options for number-to-string and string-to-number
994 conversions. They can be retrieved with numberOptions() and set with
995 setNumberOptions().
996
997 \value DefaultNumberOptions This option represents the default behavior for
998 all locales except the C locale, with group separators, with one
999 leading zero in single digit exponents, and without trailing zeroes
1000 at the end of the fractional part (when present).
1001 \value OmitGroupSeparator If this option is set, the number-to-string
1002 functions will not break up digits into groups. The C locale sets
1003 this option by default. The default for all other locales is to
1004 break up digits into groups, in the whole-number part of a number,
1005 with group separators.
1006 \value RejectGroupSeparator If this option is set, the string-to-number functions
1007 will fail if they encounter group separators in their input. The default
1008 is to accept numbers containing correctly placed group separators.
1009 \value OmitLeadingZeroInExponent If this option is set, the number-to-string
1010 functions will not pad exponents with zeroes when printing floating point
1011 numbers in scientific notation. The default is to add one leading zero to
1012 single digit exponents.
1013 \value RejectLeadingZeroInExponent If this option is set, the string-to-number
1014 functions will fail if they encounter an exponent padded with zeroes when
1015 parsing a floating point number in scientific notation. The default is to
1016 accept such padding.
1017 \value IncludeTrailingZeroesAfterDot If this option is set, the
1018 number-to-string functions will pad numbers with zeroes to the
1019 requested precision in "g" or "most concise" mode. The default is to
1020 omit trailing zeroes, which may leave fewer digits in the fractional
1021 part than the precision asked for.
1022 \value RejectTrailingZeroesAfterDot If this option is set, the
1023 string-to-number functions will fail if they encounter trailing
1024 zeroes at the end of the fractional part, when parsing a number in
1025 scientific or decimal representation. The default is to accept
1026 trailing zeroes.
1027
1028 \sa setNumberOptions(), numberOptions(), FloatingPointPrecisionOption
1029*/
1030
1031/*!
1032 \enum QLocale::FloatingPointPrecisionOption
1033
1034 This enum defines a constant that can be given as precision to QString::number(),
1035 QByteArray::number(), and QLocale::toString() when converting floats or doubles,
1036 in order to express a variable number of digits as precision.
1037
1038 \value FloatingPointShortest The conversion algorithm will try to find the
1039 shortest accurate representation for the given number. "Accurate" means
1040 that you get the exact same number back from an inverse conversion on
1041 the generated string representation. In particular, trailing zeros are
1042 omitted (from the mantissa, in exponent formats).
1043
1044 \sa toString(), QString::number(), QByteArray::number()
1045 \since 5.7
1046*/
1047
1048/*!
1049 \enum QLocale::MeasurementSystem
1050
1051 This enum defines which units are used for measurement.
1052
1053 \value MetricSystem This value indicates metric units, such as meters,
1054 centimeters and millimeters, based on \l
1055 {https://www.bipm.org/en/measurement-units} {SI}.
1056 \value ImperialUSSystem This value indicates imperial units, such as inches and
1057 miles as they are used in the United States.
1058 \value ImperialUKSystem This value indicates imperial units, such as inches and
1059 miles as they are used in the United Kingdom.
1060 \value ImperialSystem Provided for compatibility. Same as ImperialUSSystem
1061
1062 \since 4.4
1063*/
1064
1065/*!
1066 \enum QLocale::LanguageCodeType
1067
1068 This enum defines language code types that can be used to restrict set
1069 of language codes considered by \c codeToLanguage and \c languageToCode.
1070
1071 \value ISO639Part1 ISO 639 Part 1 Alpha 2 code.
1072 \value ISO639Part2B ISO 639 Part 2 bibliographic Alpha 3 code.
1073 \value ISO639Part2T ISO 639 Part 2 terminological Alpha 3 code.
1074 \value ISO639Part3 ISO 639 Part 3 Alpha 3 code.
1075 \value LegacyLanguageCode Codes that are not part of the above set, but that
1076 were supported by Qt in the past. This value can only be used by
1077 codeToLanguage(). It is ignored when passed to languageToCode().
1078 \value ISO639Part2 Any ISO 639 Part 2 code.
1079 \value ISO639Alpha2 Any ISO-639 2-letter code.
1080 \value ISO639Alpha3 Any ISO-639 3-letter code.
1081 \value ISO639 Any ISO 639 code.
1082 \value AnyLanguageCode Specifies that any code can be used.
1083*/
1084
1085/*!
1086 \fn bool QLocale::operator==(const QLocale &lhs, const QLocale &rhs)
1087
1088 Returns \c true if the two QLocale objects, \a lhs and \a rhs, are the same;
1089 otherwise returns \c false.
1090
1091 \note The system locale is not equal to the QLocale object constructed from
1092 its language(), script() and territory(), even if the two agree in all data
1093 fields. Nor are two locales with different number options equal.
1094
1095 \sa operator!=(), setNumberOptions()
1096*/
1097
1098/*!
1099 \fn bool QLocale::operator!=(const QLocale &lhs, const QLocale &rhs)
1100
1101 Returns \c true if the two QLocale objects, \a lhs and \a rhs, differ;
1102 otherwise returns \c false.
1103
1104 \note The system locale is not equal to the QLocale object constructed from
1105 its language(), script() and territory(), even if the two agree in all data
1106 fields. Nor are two locales with different number options equal.
1107
1108 \sa operator==(), setNumberOptions()
1109*/
1110
1111/*!
1112 \enum QLocale::QuotationStyle
1113
1114 This enum defines a set of possible styles for locale specific quotation.
1115
1116 \value StandardQuotation If this option is set, the standard quotation marks
1117 will be used to quote strings.
1118 \value AlternateQuotation If this option is set, the alternate quotation marks
1119 will be used to quote strings.
1120
1121 \since 4.8
1122
1123 \sa quoteString()
1124*/
1125
1126/*!
1127 \internal
1128 \class QSystemLocale
1129 \inmodule QtCore
1130 \brief The QSystemLocale class can be used to finetune the system locale
1131 of the user.
1132 \since 4.2
1133
1134 \ingroup i18n
1135
1136 \warning This class is only useful in very rare cases. Usually QLocale offers
1137 all the functionality required for application development.
1138
1139 QSystemLocale allows to override the values provided by the system
1140 locale (QLocale::system()).
1141
1142 \sa QLocale
1143*/
1144
1145/*!
1146 \enum QSystemLocale::QueryType
1147
1148 Specifies the type of information queried by query(). For each value
1149 the type of information to return from the query() method is listed.
1150
1151 \value LanguageId a uint specifying the language.
1152 \value ScriptId a uint specifying the script.
1153 \value TerritoryId a uint specifying the territory.
1154 \value DecimalPoint a QString specifying the decimal point.
1155 \value GroupSeparator a QString specifying the group separator.
1156 \value ZeroDigit a QString specifying the zero digit.
1157 \value NegativeSign a QString specifying the minus sign.
1158 \value PositiveSign a QString specifying the plus sign.
1159 \value DateFormatLong a QString specifying the long date format
1160 \value DateFormatShort a QString specifying the short date format
1161 \value TimeFormatLong a QString specifying the long time format
1162 \value TimeFormatShort a QString specifying the short time format
1163 \value DayNameLong a QString specifying the name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Sunday)
1164 \value DayNameShort a QString specifying the short name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Sunday)
1165 \value MonthNameLong a QString specifying the name of a month. the in variant contains an integer between 1 and 12
1166 \value MonthNameShort a QString specifying the short name of a month. the in variant contains an integer between 1 and 12
1167 \value DateToStringLong converts the QDate stored in the in variant to a QString using the long date format
1168 \value DateToStringShort converts the QDate stored in the in variant to a QString using the short date format
1169 \value TimeToStringLong converts the QTime stored in the in variant to a QString using the long time format
1170 \value TimeToStringShort converts the QTime stored in the in variant to a QString using the short time format
1171 \value DateTimeFormatLong a QString specifying the long date time format
1172 \value DateTimeFormatShort a QString specifying the short date time format
1173 \value DateTimeToStringLong converts the QDateTime in the in variant to a QString using the long datetime format
1174 \value DateTimeToStringShort converts the QDateTime in the in variant to a QString using the short datetime format
1175 \value MeasurementSystem a QLocale::MeasurementSystem enum specifying the measurement system
1176 \value AMText a string that represents the system AM designator associated with a 12-hour clock.
1177 \value PMText a string that represents the system PM designator associated with a 12-hour clock.
1178 \value FirstDayOfWeek a Qt::DayOfWeek enum specifying the first day of the week
1179 \value CurrencySymbol a string that represents a currency in a format QLocale::CurrencyFormat.
1180 \value CurrencyToString a localized string representation of a number with a currency symbol. Converts a QSystemLocale::CurrencyToStringArgument stored in the in variant to a QString.
1181 \value UILanguages a list of strings representing locale names that could be used for UI translation.
1182 \value StringToStandardQuotation a QString containing a quoted version of the string ref stored in the in variant using standard quotes.
1183 \value StringToAlternateQuotation a QString containing a quoted version of the string ref stored in the in variant using alternate quotes.
1184 \value Weekdays a QList<Qt::DayOfWeek> specifying the regular weekdays
1185 \value LocaleChanged this type is queried whenever the system locale is changed.
1186 \value ListToSeparatedString a string that represents a join of a given QStringList with a locale-defined separator.
1187 \value NativeLanguageName a string that represents the name of the native language.
1188 \value NativeTerritoryName a string that represents the name of the native territory.
1189
1190 \sa FormatType
1191*/
1192
1193/*!
1194 \fn QVariant QSystemLocale::query(QueryType type, QVariant &&in = QVariant()) const
1195
1196 Generic query method for locale data. Provides indirection.
1197 Denotes the \a type of the query
1198 with \a in as input data depending on the query.
1199
1200 \sa QSystemLocale::QueryType
1201*/
1202
1203/*!
1204 \fn QLocale QSystemLocale::fallbackLocale() const
1205
1206 \since 4.6
1207
1208 Returns the locale used if the system locale is not able to answer a query.
1209
1210 Must be a QLocale instance based on the built-in CLDR data, and should
1211 match what the system locale is using as closely as that data supports.
1212*/
1213
1214/*!
1215 \class QSystemLocale::CurrencyToStringArgument
1216 \inmodule QtCore
1217
1218 A helper class that provides arguments for the QSystemLocale::query()
1219 function with query type QSystemLocale::CurrencyToString.
1220
1221 \sa QSystemLocale::QueryType
1222 \since 4.8
1223*/
1224
1225/*!
1226 \fn QSystemLocale::CurrencyToStringArgument::CurrencyToStringArgument()
1227 \internal
1228*/
1229/*!
1230 \variable QSystemLocale::CurrencyToStringArgument::value
1231
1232 An input value that should be converted to its string representation.
1233 Contains one of QMetaType::LongLong, QMetaType::ULongLong or QMetaType::Double
1234 types.
1235*/
1236/*!
1237 \variable QSystemLocale::CurrencyToStringArgument::symbol
1238
1239 An optional argument containing a currency symbol to be used in the
1240 currency string.
1241*/
1242
1243/*!
1244\fn QString QLocale::toString(long i) const
1245
1246\overload
1247
1248\sa toLong()
1249*/
1250
1251/*!
1252\fn QString QLocale::toString(ulong i) const
1253
1254\overload
1255
1256\sa toULong()
1257*/
1258
1259/*!
1260\fn QString QLocale::toString(ushort i) const
1261
1262\overload
1263
1264\sa toUShort()
1265*/
1266
1267
1268/*!
1269\fn QString QLocale::toString(short i) const
1270
1271\overload
1272
1273\sa toShort()
1274*/
1275
1276/*!
1277\fn QString QLocale::toString(int i) const
1278
1279\overload
1280
1281\sa toInt()
1282*/
1283
1284/*!
1285\fn QString QLocale::toString(uint i) const
1286
1287\overload
1288
1289\sa toUInt()
1290*/
1291
1292/*
1293\fn QString QLocale::toString(long i) const
1294
1295\overload
1296
1297\sa toLong()
1298*/
1299
1300/*
1301\fn QString QLocale::toString(ulong i) const
1302
1303\overload
1304
1305\sa toULong()
1306*/
1307
1308/*!
1309\fn QString QLocale::toString(float f, char format = 'g', int precision = 6) const
1310\overload
1311
1312Returns a string representing the floating-point number \a f.
1313
1314The \a format and \a precision have the same meanings as described in \l
1315{toString(double, char, int)}.
1316
1317\sa toFloat(), toDouble(), numberOptions(), exponential(), decimalPoint(), zeroDigit(),
1318 positiveSign(), percent(), toCurrencyString(), formattedDataSize(),
1319 QLocale::FloatingPointPrecisionOption
1320*/
1321
1322/*!
1323 \fn QString QLocale::toCurrencyString(short value, const QString &symbol) const
1324 \since 4.8
1325 \overload
1326*/
1327
1328/*!
1329 \fn QString QLocale::toCurrencyString(ushort value, const QString &symbol) const
1330 \since 4.8
1331 \overload
1332*/
1333
1334/*!
1335 \fn QString QLocale::toCurrencyString(int value, const QString &symbol) const
1336 \since 4.8
1337 \overload
1338*/
1339
1340/*!
1341 \fn QString QLocale::toCurrencyString(uint value, const QString &symbol) const
1342 \since 4.8
1343 \overload
1344*/