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