1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
7 \brief The QLocale class converts between numbers and their
8 string representations in various languages.
12 \ingroup string-processing
15 QLocale is constructed for a specified language, optional script and
16 territory. It offers various facilities for formatting data as text,
17 localized appropriately, and for reading data out of localized text.
21 \snippet code/src_corelib_text_qlocale.cpp 0
23 QLocale supports the concept of a default locale, which is
24 determined from the system's locale settings at application
25 startup. The default locale can be changed by calling the
26 static member setDefault(). Setting the default locale has the
30 \li If a QLocale object is constructed with the default constructor,
31 it will use the default locale's settings.
32 \li QString::arg() uses the default locale to format a number when
33 its position specifier in the format string contains an 'L',
37 The following example illustrates how to use QLocale directly:
39 \snippet code/src_corelib_text_qlocale.cpp 1
41 An alternative method for constructing a QLocale object is by
42 specifying the locale name.
44 \snippet code/src_corelib_text_qlocale.cpp 2
46 This constructor reads the language, script and/or territory from the given
47 name, accepting either uderscore or dash as separator (and ignoring any
48 trailing \c{.codeset} or \c{@variant} suffix).
50 \note For the current keyboard input locale take a look at
51 QInputMethod::locale().
53 QLocale's data is based on Common Locale Data Repository v42.
55 \section1 Matching combinations of language, script and territory
57 QLocale has data, derived from CLDR, for many combinations of language,
58 script and territory, but not all. If it is constructed with all three of
59 these key values specified (treating \c AnyLanguage, \c AnyScript or \c
60 AnyTerritory as unspecified) and QLocale has data for the given combination,
61 this data is used. Otherwise, QLocale does its best to find a sensible
62 combination of language, script and territory, for which it does have data,
63 that matches those that were specified.
65 The CLDR provides tables of likely combinations, which are used to fill in
66 any unspecified key or keys; if QLocale has data for the result of such a
67 likely combination, that is used. If no language is specified, and none can
68 be determined from script and territory, or if QLocale has no data for the
69 language, the "C" locale (when reading the keys from a string) or default
70 locale (otherwise) is used.
72 When QLocale has no data for the keys specified, with likely keys filled in
73 where unspecified, but does have data for the resulting language, a
74 fall-back is sought, based on ignoring either territory, script or both (in
75 that order). This results in a QLocale which may not match what was asked
76 for, but provides localization that's as suitable as the available data
77 permits, for the keys specified.
79 Use language(), script() and territory() to determine the actual keys used.
81 \sa QString::arg(), QInputMethod::locale()
85 \enum QLocale::Language
87 This enumerated type is used to specify a language.
90 \value C A simplified English locale; see QLocale::c()
93 \value Afan Obsolete, please use Oromo
98 \value [since 5.1] Akkadian
99 \value [since 5.3] Akoose
101 \value [since 5.7] AmericanSignLanguage
103 \value [since 5.1] AncientEgyptian
104 \value [since 5.1] AncientGreek
106 \value [since 5.1] Aragonese
107 \value [since 5.1] Aramaic
118 \value [since 5.1] Balinese
120 \value [since 5.1] Bamun
121 \value [since 6.0] Bangla
125 \value [since 5.1] BatakToba
129 \value Bengali Obsolete, please use Bangla
130 \value [since 5.7] Bhojpuri
131 \value Bhutani Obsolete, please use Dzongkha
137 \value [since 5.1] Buginese
140 \value Byelorussian Obsolete, please use Belarusian
141 \value Cambodian Obsolete, please use Khmer
142 \value [since 5.7] Cantonese
144 \value [since 5.14] Cebuano
145 \value [since 6.0] CentralAtlasTamazight
146 \value [since 5.5] CentralKurdish
147 \value CentralMoroccoTamazight Obsolete, please use CentralAtlasTamazight
148 \value [since 5.1] Chakma
152 \value Chewa Obsolete, please use Nyanja
153 \value [since 5.14] Chickasaw
155 \value Chinese (Mandarin)
159 \value [since 5.1] Coptic
167 \value [since 5.1] Dogri
173 \value [since 5.14] Erzya
183 \value Frisian same as WesternFrisian
193 \value [since 5.1] Gothic
195 \value Greenlandic Obsolete, please use Kalaallisut
200 \value [since 6.5] Haryanvi
209 \value [since 5.12] Ido
211 \value [since 5.5] InariSami
213 \value [since 5.1] Ingush
217 \value Inupiak Obsolete, please use Inupiaq
218 \value [since 6.0] Inupiaq
227 \value [since 6.3] Kaingang
229 \value [since 6.0] Kalaallisut
236 \value [since 5.5] Kenyang
238 \value [since 5.5] Kiche
241 \value Kirghiz Obsolete, please use Kyrgyz
247 \value KoyraboroSenni
250 \value [since 6.0] Kuanyama
252 \value Kurundi Obsolete, please use Rundi
253 \value Kwanyama Obsolete, please use Kuanyama
255 \value [since 6.0] Kyrgyz
256 \value [since 5.3] Lakota
261 \value [since 5.5] Lezghian
264 \value [since 5.7] LiteraryChinese
266 \value [since 5.12] Lojban
267 \value [since 5.5] LowerSorbian
270 \value [since 5.5] LuleSami
276 \value [since 5.5] Maithili
283 \value [since 5.1] Mandingo
284 \value [since 5.1] Manipuri
287 \value [since 5.5] Mapuche
291 \value [since 5.7] Mazanderani
292 \value [since 5.5] Mende
295 \value [since 5.5] Mohawk
296 \value [since 6.5] Moksha
300 \value [since 5.14] Muscogee
303 \value Navaho Obsolete, please use Navajo
304 \value [since 6.0] Navajo
307 \value [since 5.7] Newari
309 \value [since 6.3] Nheengatu
310 \value [since 6.0] NigerianPidgin
312 \value [since 5.5] Nko
313 \value [since 6.5] NorthernFrisian
314 \value [since 5.7] NorthernLuri
318 \value NorwegianBokmal
319 \value NorwegianNynorsk
323 \value [since 6.5] Obolo
325 \value [since 6.0] Odia
327 \value [since 5.1] OldIrish
328 \value [since 5.1] OldNorse
329 \value [since 5.1] OldPersian
330 \value Oriya Obsolete, please use Odia
332 \value [since 5.7] Osage
334 \value [since 5.1] Pahlavi
335 \value [since 5.7] Palauan
337 \value [since 5.7] Papiamento
340 \value [since 5.1] Phoenician
341 \value [since 6.5] Pijin
344 \value [since 5.5] Prussian
347 \value [since 6.5] Rajasthani
348 \value RhaetoRomance Obsolete, please use Romansh
362 \value [since 5.1] Santali
364 \value [since 5.1] Saurashtra
370 \value [since 5.12] Sicilian
372 \value [since 5.14] Silesian
375 \value [since 5.5] SkoltSami
380 \value [since 5.12] SouthernKurdish
381 \value [since 5.5] SouthernSami
385 \value [since 5.3] StandardMoroccanTamazight
394 \value [since 5.1] TaiDam
407 \value [since 5.7] TokelauLanguage
408 \value [since 6.5] TokiPona
409 \value [since 5.7] TokPisin
415 \value [since 5.7] TuvaluLanguage
417 \value [since 5.1] Ugaritic
418 \value Uighur Obsolete, please use Uyghur
419 \value Uigur Obsolete, please use Uyghur
421 \value [since 5.5] UpperSorbian
423 \value [since 6.0] Uyghur
430 \value Walamo Obsolete, please use Wolaytta
433 \value [since 5.5] Warlpiri
435 \value [since 5.12] WesternBalochi
436 \value WesternFrisian same as Frisian
437 \value [since 6.0] Wolaytta
447 \omitvalue LastLanguage
449 \sa language(), languageToString()
453 \typealias QLocale::Territory
455 This enumeration type is an alias for \l Country,
456 which shall be renamed to Territory at a future release.
458 \sa territory(), territoryToString()
462 \enum QLocale::Country
464 This enumerated type is used to identify a territory.
466 An individual territory may be a province of a country, a country (by far the
467 most common case) or a larger geographic entity, to which some localization
468 details are specific.
470 \value AnyCountry Osbolete alias for \c AnyTerritory
471 \value [since 6.2] AnyTerritory
482 \value AntiguaAndBarbuda
486 \value AscensionIsland
502 \value BosniaAndHerzegowina Obsolete, use \c BosniaAndHerzegovina instead
503 \value [since 6.0] BosniaAndHerzegovina
507 \value BritishIndianOceanTerritory
508 \value BritishVirginIslands
517 \value CaribbeanNetherlands
520 \value CentralAfricanRepublic
521 \value CeutaAndMelilla
525 \value ChristmasIsland
526 \value ClippertonIsland
530 \value CongoBrazzaville
536 \value [since 6.0] Curacao
537 \value CuraSao Obsolete, use \c Curacao instead
539 \value [since 6.0] Czechia
540 \value CzechRepublic Obsolete, use \c Czechia instead
541 \value DemocraticRepublicOfCongo Obsolete, use \c CongoKinshasa instead
542 \value DemocraticRepublicOfKorea Obsolete, use \c NorthKorea instead
547 \value DominicanRepublic
552 \value EquatorialGuinea
557 \value [since 5.7] EuropeanUnion
558 \value [since 5.12] Europe
559 \value FalklandIslands
565 \value FrenchPolynesia
566 \value FrenchSouthernTerritories
584 \value HeardAndMcDonaldIslands
605 \value [since 5.2] Kosovo
610 \value LatinAmericaAndTheCaribbean Obsolete, use \c LatinAmerica instead
628 \value MarshallIslands
644 \value NauruCountry Osbolete alias for \c NauruTerritory
645 \value [since 6.2] NauruTerritory
655 \value NorthernMarianaIslands
659 \value [since 5.7] OutlyingOceania
662 \value PalestinianTerritories
664 \value PapuaNewGuinea
666 \value PeoplesRepublicOfCongo Obsolete, use \c CongoBrazzaville instead
674 \value RepublicOfKorea Obsolete, use \c SouthKorea instead
677 \value RussianFederation
680 \value SaintBarthelemy
682 \value SaintKittsAndNevis
685 \value SaintPierreAndMiquelon
686 \value SaintVincentAndGrenadines
687 \value SaintVincentAndTheGrenadines
690 \value SaoTomeAndPrincipe
700 \value SolomonIslands
703 \value SouthGeorgiaAndSouthSandwichIslands
704 \value SouthGeorgiaAndTheSouthSandwichIslands
711 \value SvalbardAndJanMayen
712 \value SvalbardAndJanMayenIslands
717 \value SyrianArabRepublic Obsolete, use \c Syria instead
724 \value TokelauCountry Osbolete alias for \c TokelauTerritory
725 \value [since 6.2] TokelauTerritory
727 \value TrinidadAndTobago
728 \value TristanDaCunha
732 \value TurksAndCaicosIslands
733 \value TuvaluCountry Osbolete alias for \c TuvaluTerritory
734 \value [since 6.2] TuvaluTerritory
737 \value UnitedArabEmirates
740 \value UnitedStatesOutlyingIslands
741 \value UnitedStatesMinorOutlyingIslands
742 \value UnitedStatesVirginIslands
747 \value VaticanCityState
750 \value WallisAndFutuna
751 \value WallisAndFutunaIslands
753 \value [since 5.12] World
758 \omitvalue LastCountry Osbolete alias for \c LastTerritory
759 \omitvalue LastTerritory
761 \note Use the Territory alias for this enumeration where possible.
762 The Country enum shall be renamed to Territory at a later release.
764 \sa territory(), territoryToString(), codeToTerritory(), territoryToCode()
768 \enum QLocale::Script
770 This enumerated type is used to specify a script.
774 \value [since 5.7] AdlamScript
775 \value [since 5.7] AhomScript
776 \value [since 5.7] AnatolianHieroglyphsScript
778 \value ArmenianScript
779 \value [since 5.1] AvestanScript
780 \value [since 5.1] BalineseScript
781 \value [since 5.1] BamumScript
782 \value [since 6.0] BanglaScript
783 \value [since 5.5] BassaVahScript
784 \value [since 5.1] BatakScript
785 \value BengaliScript Obsolete, please use BanglaScript
786 \value [since 5.7] BhaiksukiScript
787 \value [since 5.1] BopomofoScript
788 \value [since 5.1] BrahmiScript
789 \value [since 5.1] BrailleScript
790 \value [since 5.1] BugineseScript
791 \value [since 5.1] BuhidScript
792 \value [since 5.1] CanadianAboriginalScript
793 \value [since 5.1] CarianScript
794 \value [since 5.5] CaucasianAlbanianScript
795 \value [since 5.1] ChakmaScript
796 \value [since 5.1] ChamScript
797 \value CherokeeScript
798 \value [since 5.1] CopticScript
799 \value [since 5.1] CuneiformScript
800 \value [since 5.1] CypriotScript
801 \value CyrillicScript
802 \value [since 5.1] DeseretScript
803 \value DevanagariScript
804 \value [since 5.5] DuployanScript
805 \value [since 5.1] EgyptianHieroglyphsScript
806 \value [since 5.5] ElbasanScript
807 \value EthiopicScript
808 \value [since 5.1] FraserScript
809 \value GeorgianScript
810 \value [since 5.1] GlagoliticScript
811 \value [since 5.1] GothicScript
812 \value [since 5.5] GranthaScript
814 \value GujaratiScript
815 \value GurmukhiScript
816 \value [since 5.1] HangulScript
817 \value [since 5.1] HanScript
818 \value [since 5.1] HanunooScript
819 \value [since 5.7] HanWithBopomofoScript
820 \value [since 5.7] HatranScript
822 \value [since 5.1] HiraganaScript
823 \value [since 5.1] ImperialAramaicScript
824 \value [since 5.1] InscriptionalPahlaviScript
825 \value [since 5.1] InscriptionalParthianScript
826 \value [since 5.7] JamoScript
827 \value JapaneseScript
828 \value [since 5.1] JavaneseScript
829 \value [since 5.1] KaithiScript
831 \value [since 5.1] KatakanaScript
832 \value [since 5.1] KayahLiScript
833 \value [since 5.1] KharoshthiScript
834 \value [since 5.1] KhmerScript
835 \value [since 5.5] KhojkiScript
836 \value [since 5.5] KhudawadiScript
838 \value [since 5.1] LannaScript
841 \value [since 5.1] LepchaScript
842 \value [since 5.1] LimbuScript
843 \value [since 5.5] LinearAScript
844 \value [since 5.1] LinearBScript
845 \value [since 5.1] LycianScript
846 \value [since 5.1] LydianScript
847 \value [since 5.5] MahajaniScript
848 \value MalayalamScript
849 \value [since 5.1] MandaeanScript
850 \value [since 5.5] ManichaeanScript
851 \value [since 5.7] MarchenScript
852 \value [since 5.1] MeiteiMayekScript
853 \value [since 6.0] MendeScript
854 \value MendeKikakuiScript Obsolete, please use MendeScript
855 \value [since 5.1] MeroiticCursiveScript
856 \value [since 5.1] MeroiticScript
857 \value [since 5.5] ModiScript
858 \value MongolianScript
859 \value [since 5.5] MroScript
860 \value [since 5.7] MultaniScript
862 \value [since 5.5] NabataeanScript
863 \value [since 5.7] NewaScript
864 \value [since 5.1] NewTaiLueScript
865 \value [since 5.1] NkoScript
866 \value [since 5.1] OghamScript
867 \value [since 5.1] OlChikiScript
868 \value [since 5.7] OldHungarianScript
869 \value [since 5.1] OldItalicScript
870 \value [since 5.5] OldNorthArabianScript
871 \value [since 5.5] OldPermicScript
872 \value [since 5.1] OldPersianScript
873 \value [since 5.1] OldSouthArabianScript
874 \value [since 6.0] OdiaScript
875 \value OriyaScript Obsolete, please use OdiaScript
876 \value [since 5.1] OrkhonScript
877 \value [since 5.7] OsageScript
878 \value [since 5.1] OsmanyaScript
879 \value [since 5.5] PahawhHmongScript
880 \value [since 5.5] PalmyreneScript
881 \value [since 5.5] PauCinHauScript
882 \value [since 5.1] PhagsPaScript
883 \value [since 5.1] PhoenicianScript
884 \value [since 5.1] PollardPhoneticScript
885 \value [since 5.5] PsalterPahlaviScript
886 \value [since 5.1] RejangScript
887 \value [since 5.1] RunicScript
888 \value [since 5.1] SamaritanScript
889 \value [since 5.1] SaurashtraScript
890 \value [since 5.1] SharadaScript
891 \value [since 5.1] ShavianScript
892 \value [since 5.5] SiddhamScript
893 \value [since 5.7] SignWritingScript
894 \value SimplifiedChineseScript same as SimplifiedHanScript
895 \value SimplifiedHanScript same as SimplifiedChineseScript
897 \value [since 5.1] SoraSompengScript
898 \value [since 5.1] SundaneseScript
899 \value [since 5.1] SylotiNagriScript
901 \value [since 5.1] TagalogScript
902 \value [since 5.1] TagbanwaScript
903 \value [since 5.1] TaiLeScript
904 \value [since 5.1] TaiVietScript
905 \value [since 5.1] TakriScript
907 \value [since 5.7] TangutScript
912 \value TifinaghScript
913 \value [since 5.5] TirhutaScript
914 \value TraditionalChineseScript same as TraditionalHanScript
915 \value TraditionalHanScript same as TraditionalChineseScript
916 \value [since 5.1] UgariticScript
918 \value [since 5.5] VarangKshitiScript
921 \omitvalue LastScript
923 \sa script(), scriptToString(), languageToString()
927 \enum QLocale::FormatType
929 This enum describes the different formats that can be used when
930 converting QDate, QTime, and QDateTime objects, as well
931 as months and days, to strings specific to the locale.
933 \value LongFormat Longer format.
935 \value ShortFormat Shorter format.
937 \value NarrowFormat A special version for use when space is very limited.
939 \note \c NarrowFormat might contain the same text for
940 different months and days. It can even be an empty string if the
941 locale doesn't support narrow names, so you should avoid using it
942 for date formatting. Also, for the system locale this format is
943 the same as \c ShortFormat.
945 \sa dateFormat(), timeFormat(), dateTimeFormat()
946 \sa monthName(), standaloneMonthName(), dayName(), standaloneDayName()
947 \sa toDate(), toTime(), toDateTime()
951 \enum QLocale::NumberOption
953 This enum defines a set of options for number-to-string and string-to-number
954 conversions. They can be retrieved with numberOptions() and set with
957 \value DefaultNumberOptions This option represents the default behavior, with
958 group separators, with one leading zero in single digit exponents, and
959 without trailing zeroes after the decimal dot.
960 \value OmitGroupSeparator If this option is set, the number-to-string functions
961 will not insert group separators in their return values. The default
962 is to insert group separators.
963 \value RejectGroupSeparator If this option is set, the string-to-number functions
964 will fail if they encounter group separators in their input. The default
965 is to accept numbers containing correctly placed group separators.
966 \value OmitLeadingZeroInExponent If this option is set, the number-to-string
967 functions will not pad exponents with zeroes when printing floating point
968 numbers in scientific notation. The default is to add one leading zero to
969 single digit exponents.
970 \value RejectLeadingZeroInExponent If this option is set, the string-to-number
971 functions will fail if they encounter an exponent padded with zeroes when
972 parsing a floating point number in scientific notation. The default is to
974 \value IncludeTrailingZeroesAfterDot If this option is set, the number-to-string
975 functions will pad numbers with zeroes to the requested precision in "g"
976 or "most concise" mode, even if the number of significant digits is lower
977 than the requested precision. The default is to omit trailing zeroes.
978 \value RejectTrailingZeroesAfterDot If this option is set, the string-to-number
979 functions will fail if they encounter trailing zeroes after the decimal
980 dot when parsing a number in scientific or decimal representation. The
981 default is to accept trailing zeroes.
983 \sa setNumberOptions(), numberOptions(), FloatingPointPrecisionOption
987 \enum QLocale::FloatingPointPrecisionOption
989 This enum defines a constant that can be given as precision to QString::number(),
990 QByteArray::number(), and QLocale::toString() when converting floats or doubles,
991 in order to express a variable number of digits as precision.
993 \value FloatingPointShortest The conversion algorithm will try to find the
994 shortest accurate representation for the given number. "Accurate" means
995 that you get the exact same number back from an inverse conversion on
996 the generated string representation. In particular, trailing zeros are
997 omitted (from the mantissa, in exponent formats).
999 \sa toString(), QString::number(), QByteArray::number()
1004 \enum QLocale::MeasurementSystem
1006 This enum defines which units are used for measurement.
1008 \value MetricSystem This value indicates metric units, such as meters,
1009 centimeters and millimeters.
1010 \value ImperialUSSystem This value indicates imperial units, such as inches and
1011 miles as they are used in the United States.
1012 \value ImperialUKSystem This value indicates imperial units, such as inches and
1013 miles as they are used in the United Kingdom.
1014 \value ImperialSystem Provided for compatibility. Same as ImperialUSSystem
1020 \enum QLocale::LanguageCodeType
1022 This enum defines language code types that can be used to restrict set
1023 of language codes considered by \c codeToLanguage and \c languageToCode.
1025 \value ISO639Part1 ISO 639 Part 1 Alpha 2 code.
1026 \value ISO639Part2B ISO 639 Part 2 bibliographic Alpha 3 code.
1027 \value ISO639Part2T ISO 639 Part 2 terminological Alpha 3 code.
1028 \value ISO639Part3 ISO 639 Part 3 Alpha 3 code.
1029 \value LegacyLanguageCode Codes that are not part of the above set, but that
1030 were supported by Qt in the past. This value can only be used by
1031 codeToLanguage(). It is ignored when passed to languageToCode().
1032 \value ISO639Part2 Any ISO 639 Part 2 code.
1033 \value ISO639Alpha2 Any ISO-639 2-letter code.
1034 \value ISO639Alpha3 Any ISO-639 3-letter code.
1035 \value ISO639 Any ISO 639 code.
1036 \value AnyLanguageCode Specifies that any code can be used.
1040 \fn bool QLocale::operator==(const QLocale &lhs, const QLocale &rhs)
1042 Returns \c true if the two QLocale objects, \a lhs and \a rhs, are the same;
1043 otherwise returns \c false.
1045 \note The system locale is not equal to the QLocale object constructed from
1046 its language(), script() and territory(), even if the two agree in all data
1047 fields. Nor are two locales with different number options equal.
1049 \sa operator!=(), setNumberOptions()
1053 \fn bool QLocale::operator!=(const QLocale &lhs, const QLocale &rhs)
1055 Returns \c true if the two QLocale objects, \a lhs and \a rhs, differ;
1056 otherwise returns \c false.
1058 \note The system locale is not equal to the QLocale object constructed from
1059 its language(), script() and territory(), even if the two agree in all data
1060 fields. Nor are two locales with different number options equal.
1062 \sa operator==(), setNumberOptions()
1066 \enum QLocale::QuotationStyle
1068 This enum defines a set of possible styles for locale specific quotation.
1070 \value StandardQuotation If this option is set, the standard quotation marks
1071 will be used to quote strings.
1072 \value AlternateQuotation If this option is set, the alternate quotation marks
1073 will be used to quote strings.
1082 \class QSystemLocale
1084 \brief The QSystemLocale class can be used to finetune the system locale
1090 \warning This class is only useful in very rare cases. Usually QLocale offers
1091 all the functionality required for application development.
1093 QSystemLocale allows to override the values provided by the system
1094 locale (QLocale::system()).
1100 \enum QSystemLocale::QueryType
1102 Specifies the type of information queried by query(). For each value
1103 the type of information to return from the query() method is listed.
1105 \value LanguageId a uint specifying the language.
1106 \value ScriptId a uint specifying the script.
1107 \value TerritoryId a uint specifying the territory.
1108 \value DecimalPoint a QString specifying the decimal point.
1109 \value GroupSeparator a QString specifying the group separator.
1110 \value ZeroDigit a QString specifying the zero digit.
1111 \value NegativeSign a QString specifying the minus sign.
1112 \value PositiveSign a QString specifying the plus sign.
1113 \value DateFormatLong a QString specifying the long date format
1114 \value DateFormatShort a QString specifying the short date format
1115 \value TimeFormatLong a QString specifying the long time format
1116 \value TimeFormatShort a QString specifying the short time format
1117 \value DayNameLong a QString specifying the name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Sunday)
1118 \value DayNameShort a QString specifying the short name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Sunday)
1119 \value MonthNameLong a QString specifying the name of a month. the in variant contains an integer between 1 and 12
1120 \value MonthNameShort a QString specifying the short name of a month. the in variant contains an integer between 1 and 12
1121 \value DateToStringLong converts the QDate stored in the in variant to a QString using the long date format
1122 \value DateToStringShort converts the QDate stored in the in variant to a QString using the short date format
1123 \value TimeToStringLong converts the QTime stored in the in variant to a QString using the long time format
1124 \value TimeToStringShort converts the QTime stored in the in variant to a QString using the short time format
1125 \value DateTimeFormatLong a QString specifying the long date time format
1126 \value DateTimeFormatShort a QString specifying the short date time format
1127 \value DateTimeToStringLong converts the QDateTime in the in variant to a QString using the long datetime format
1128 \value DateTimeToStringShort converts the QDateTime in the in variant to a QString using the short datetime format
1129 \value MeasurementSystem a QLocale::MeasurementSystem enum specifying the measurement system
1130 \value AMText a string that represents the system AM designator associated with a 12-hour clock.
1131 \value PMText a string that represents the system PM designator associated with a 12-hour clock.
1132 \value FirstDayOfWeek a Qt::DayOfWeek enum specifying the first day of the week
1133 \value CurrencySymbol a string that represents a currency in a format QLocale::CurrencyFormat.
1134 \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.
1135 \value UILanguages a list of strings representing locale names that could be used for UI translation.
1136 \value StringToStandardQuotation a QString containing a quoted version of the string ref stored in the in variant using standard quotes.
1137 \value StringToAlternateQuotation a QString containing a quoted version of the string ref stored in the in variant using alternate quotes.
1138 \value Weekdays a QList<Qt::DayOfWeek> specifying the regular weekdays
1139 \value LocaleChanged this type is queried whenever the system locale is changed.
1140 \value ListToSeparatedString a string that represents a join of a given QStringList with a locale-defined separator.
1141 \value NativeLanguageName a string that represents the name of the native language.
1142 \value NativeTerritoryName a string that represents the name of the native territory.
1148 \fn QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
1150 Generic query method for locale data. Provides indirection.
1151 Denotes the \a type of the query
1152 with \a in as input data depending on the query.
1154 \sa QSystemLocale::QueryType
1158 \fn QLocale QSystemLocale::fallbackLocale() const
1162 Returns the locale used if the system locale is not able to answer a query.
1164 Must be a QLocale instance based on the built-in CLDR data, and should
1165 match what the system locale is using as closely as that data supports.
1169 \class QSystemLocale::CurrencyToStringArgument
1172 A helper class that provides arguments for the QSystemLocale::query()
1173 function with query type QSystemLocale::CurrencyToString.
1175 \sa QSystemLocale::QueryType
1180 \fn QSystemLocale::CurrencyToStringArgument::CurrencyToStringArgument()
1184 \variable QSystemLocale::CurrencyToStringArgument::value
1186 An input value that should be converted to its string representation.
1187 Contains one of QMetaType::LongLong, QMetaType::ULongLong or QMetaType::Double
1191 \variable QSystemLocale::CurrencyToStringArgument::symbol
1193 An optional argument containing a currency symbol to be used in the
1198\fn QString QLocale::toString(long i) const
1206\fn QString QLocale::toString(ulong i) const
1214\fn QString QLocale::toString(ushort i) const
1223\fn QString QLocale::toString(short i) const
1231\fn QString QLocale::toString(int i) const
1239\fn QString QLocale::toString(uint i) const
1247\fn QString QLocale::toString(long i) const
1255\fn QString QLocale::toString(ulong i) const
1263\fn QString QLocale::toString(float f, char format = 'g', int precision = 6) const
1266Returns a string representing the floating-point number \a f.
1268The \a format and \a precision have the same meanings as described in \l
1269{toString(double, char, int)}.
1271\sa toFloat(), toDouble(), numberOptions(), exponential(), decimalPoint(), zeroDigit(),
1272 positiveSign(), percent(), toCurrencyString(), formattedDataSize(),
1273 QLocale::FloatingPointPrecisionOption
1277 \fn QString QLocale::toCurrencyString(short value, const QString &symbol) const
1283 \fn QString QLocale::toCurrencyString(ushort value, const QString &symbol) const
1289 \fn QString QLocale::toCurrencyString(int value, const QString &symbol) const
1295 \fn QString QLocale::toCurrencyString(uint value, const QString &symbol) const