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.
13 \ingroup string-processing
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.
22 \snippet code/src_corelib_text_qlocale.cpp 0
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
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',
38 The following example illustrates how to use QLocale directly:
40 \snippet code/src_corelib_text_qlocale.cpp 1
42 An alternative method for constructing a QLocale object is by
43 specifying the locale name.
45 \snippet code/src_corelib_text_qlocale.cpp 2
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).
51 \note For the current keyboard input locale take a look at
52 QInputMethod::locale().
54 QLocale's data is based on Common Locale Data Repository v44.1.
56 \section1 Matching combinations of language, script and territory
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.
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.
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.
80 Use language(), script() and territory() to determine the actual keys used.
82 \sa QString::arg(), QInputMethod::locale()
86 \enum QLocale::Language
88 This enumerated type is used to specify a language.
91 \value C A simplified English locale; see QLocale::c()
94 \value Afan Obsolete, please use Oromo
99 \value [since 5.1] Akkadian
100 \value [since 5.3] Akoose
102 \value [since 5.7] AmericanSignLanguage
104 \value [since 5.1] AncientEgyptian
105 \value [since 5.1] AncientGreek
106 \value [since 6.7] Anii
108 \value [since 5.1] Aragonese
109 \value [since 5.1] Aramaic
120 \value [since 5.1] Balinese
121 \value [since 6.6] Baluchi
123 \value [since 5.1] Bamun
124 \value [since 6.0] Bangla
128 \value [since 5.1] BatakToba
132 \value Bengali Obsolete, please use Bangla
133 \value [since 5.7] Bhojpuri
134 \value Bhutani Obsolete, please use Dzongkha
140 \value [since 5.1] Buginese
143 \value Byelorussian Obsolete, please use Belarusian
144 \value Cambodian Obsolete, please use Khmer
145 \value [since 5.7] Cantonese
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
155 \value Chewa Obsolete, please use Nyanja
156 \value [since 5.14] Chickasaw
158 \value Chinese (Mandarin)
162 \value [since 5.1] Coptic
170 \value [since 5.1] Dogri
176 \value [since 5.14] Erzya
186 \value Frisian same as WesternFrisian
196 \value [since 5.1] Gothic
198 \value Greenlandic Obsolete, please use Kalaallisut
203 \value [since 6.5] Haryanvi
212 \value [since 5.12] Ido
214 \value [since 5.5] InariSami
216 \value [since 5.1] Ingush
220 \value Inupiak Obsolete, please use Inupiaq
221 \value [since 6.0] Inupiaq
230 \value [since 6.3] Kaingang
232 \value [since 6.0] Kalaallisut
235 \value [since 6.7] Kangri
240 \value [since 5.5] Kenyang
242 \value [since 5.5] Kiche
245 \value Kirghiz Obsolete, please use Kyrgyz
251 \value KoyraboroSenni
254 \value [since 6.0] Kuanyama
256 \value Kurundi Obsolete, please use Rundi
257 \value Kwanyama Obsolete, please use Kuanyama
259 \value [since 6.0] Kyrgyz
260 \value [since 5.3] Lakota
265 \value [since 5.5] Lezghian
268 \value [since 6.6] Ligurian
269 \value [since 5.7] LiteraryChinese
271 \value [since 5.12] Lojban
272 \value [since 5.5] LowerSorbian
275 \value [since 5.5] LuleSami
281 \value [since 5.5] Maithili
288 \value [since 5.1] Mandingo
289 \value [since 5.1] Manipuri
292 \value [since 5.5] Mapuche
296 \value [since 5.7] Mazanderani
297 \value [since 5.5] Mende
300 \value [since 5.5] Mohawk
301 \value [since 6.5] Moksha
305 \value [since 5.14] Muscogee
308 \value Navaho Obsolete, please use Navajo
309 \value [since 6.0] Navajo
312 \value [since 5.7] Newari
314 \value [since 6.3] Nheengatu
315 \value [since 6.0] NigerianPidgin
317 \value [since 5.5] Nko
318 \value [since 6.5] NorthernFrisian
319 \value [since 5.7] NorthernLuri
323 \value NorwegianBokmal
324 \value NorwegianNynorsk
328 \value [since 6.5] Obolo
330 \value [since 6.0] Odia
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
337 \value [since 5.7] Osage
339 \value [since 5.1] Pahlavi
340 \value [since 5.7] Palauan
342 \value [since 5.7] Papiamento
345 \value [since 5.1] Phoenician
346 \value [since 6.5] Pijin
349 \value [since 5.5] Prussian
352 \value [since 6.5] Rajasthani
353 \value RhaetoRomance Obsolete, please use Romansh
354 \value [since 6.6] Rohingya
368 \value [since 5.1] Santali
370 \value [since 5.1] Saurashtra
376 \value [since 5.12] Sicilian
378 \value [since 5.14] Silesian
381 \value [since 5.5] SkoltSami
386 \value [since 5.12] SouthernKurdish
387 \value [since 5.5] SouthernSami
391 \value [since 5.3] StandardMoroccanTamazight
400 \value [since 5.1] TaiDam
413 \value [since 5.7] TokelauLanguage
414 \value [since 6.5] TokiPona
415 \value [since 5.7] TokPisin
417 \value [since 6.6] Torwali
422 \value [since 5.7] TuvaluLanguage
424 \value [since 5.1] Ugaritic
425 \value Uighur Obsolete, please use Uyghur
426 \value Uigur Obsolete, please use Uyghur
428 \value [since 5.5] UpperSorbian
430 \value [since 6.0] Uyghur
434 \value [since 6.7] Venetian
438 \value Walamo Obsolete, please use Wolaytta
441 \value [since 5.5] Warlpiri
443 \value [since 5.12] WesternBalochi
444 \value WesternFrisian same as Frisian
445 \value [since 6.0] Wolaytta
455 \omitvalue LastLanguage
457 \sa language(), languageToString()
461 \typealias QLocale::Territory
463 This enumeration type is an alias for \l Country,
464 which shall be renamed to Territory at a future release.
466 \sa territory(), territoryToString()
470 \enum QLocale::Country
472 This enumerated type is used to identify a territory.
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.
478 \value AnyCountry Osbolete alias for \c AnyTerritory
479 \value [since 6.2] AnyTerritory
490 \value AntiguaAndBarbuda
494 \value AscensionIsland
510 \value BosniaAndHerzegowina Obsolete, use \c BosniaAndHerzegovina instead
511 \value [since 6.0] BosniaAndHerzegovina
515 \value BritishIndianOceanTerritory
516 \value BritishVirginIslands
525 \value CaribbeanNetherlands
528 \value CentralAfricanRepublic
529 \value CeutaAndMelilla
533 \value ChristmasIsland
534 \value ClippertonIsland
538 \value CongoBrazzaville
544 \value [since 6.0] Curacao
545 \value CuraSao Obsolete, use \c Curacao instead
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
555 \value DominicanRepublic
560 \value EquatorialGuinea
565 \value [since 5.7] EuropeanUnion
566 \value [since 5.12] Europe
567 \value FalklandIslands
573 \value FrenchPolynesia
574 \value FrenchSouthernTerritories
592 \value HeardAndMcDonaldIslands
613 \value [since 5.2] Kosovo
618 \value LatinAmericaAndTheCaribbean Obsolete, use \c LatinAmerica instead
636 \value MarshallIslands
652 \value NauruCountry Osbolete alias for \c NauruTerritory
653 \value [since 6.2] NauruTerritory
663 \value NorthernMarianaIslands
667 \value [since 5.7] OutlyingOceania
670 \value PalestinianTerritories
672 \value PapuaNewGuinea
674 \value PeoplesRepublicOfCongo Obsolete, use \c CongoBrazzaville instead
682 \value RepublicOfKorea Obsolete, use \c SouthKorea instead
685 \value RussianFederation
688 \value SaintBarthelemy
690 \value SaintKittsAndNevis
693 \value SaintPierreAndMiquelon
694 \value SaintVincentAndGrenadines
695 \value SaintVincentAndTheGrenadines
698 \value SaoTomeAndPrincipe
708 \value SolomonIslands
711 \value SouthGeorgiaAndSouthSandwichIslands
712 \value SouthGeorgiaAndTheSouthSandwichIslands
719 \value SvalbardAndJanMayen
720 \value SvalbardAndJanMayenIslands
725 \value SyrianArabRepublic Obsolete, use \c Syria instead
732 \value TokelauCountry Osbolete alias for \c TokelauTerritory
733 \value [since 6.2] TokelauTerritory
735 \value TrinidadAndTobago
736 \value TristanDaCunha
740 \value TurksAndCaicosIslands
741 \value TuvaluCountry Osbolete alias for \c TuvaluTerritory
742 \value [since 6.2] TuvaluTerritory
745 \value UnitedArabEmirates
748 \value UnitedStatesOutlyingIslands
749 \value UnitedStatesMinorOutlyingIslands
750 \value UnitedStatesVirginIslands
755 \value VaticanCityState
758 \value WallisAndFutuna
759 \value WallisAndFutunaIslands
761 \value [since 5.12] World
766 \omitvalue LastCountry Osbolete alias for \c LastTerritory
767 \omitvalue LastTerritory
769 \note Use the Territory alias for this enumeration where possible.
770 The Country enum shall be renamed to Territory at a later release.
772 \sa territory(), territoryToString(), codeToTerritory(), territoryToCode()
776 \enum QLocale::Script
778 This enumerated type is used to specify a script.
782 \value [since 5.7] AdlamScript
783 \value [since 5.7] AhomScript
784 \value [since 5.7] AnatolianHieroglyphsScript
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
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
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
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
847 \value [since 5.1] LannaScript
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
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
906 \value [since 5.1] SoraSompengScript
907 \value [since 5.1] SundaneseScript
908 \value [since 5.1] SylotiNagriScript
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
916 \value [since 5.7] TangutScript
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
927 \value [since 5.5] VarangKshitiScript
930 \omitvalue LastScript
932 \sa script(), scriptToString(), languageToString()
936 \enum QLocale::FormatType
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.
942 \value LongFormat Longer format.
944 \value ShortFormat Shorter format.
946 \value NarrowFormat A special version for use when space is very limited.
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.
954 \sa dateFormat(), timeFormat(), dateTimeFormat()
955 \sa monthName(), standaloneMonthName(), dayName(), standaloneDayName()
956 \sa toDate(), toTime(), toDateTime()
960 \enum QLocale::NumberOption
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
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
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.
992 \sa setNumberOptions(), numberOptions(), FloatingPointPrecisionOption
996 \enum QLocale::FloatingPointPrecisionOption
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.
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).
1008 \sa toString(), QString::number(), QByteArray::number()
1013 \enum QLocale::MeasurementSystem
1015 This enum defines which units are used for measurement.
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
1029 \enum QLocale::LanguageCodeType
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.
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.
1049 \fn bool QLocale::operator==(const QLocale &lhs, const QLocale &rhs)
1051 Returns \c true if the two QLocale objects, \a lhs and \a rhs, are the same;
1052 otherwise returns \c false.
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.
1058 \sa operator!=(), setNumberOptions()
1062 \fn bool QLocale::operator!=(const QLocale &lhs, const QLocale &rhs)
1064 Returns \c true if the two QLocale objects, \a lhs and \a rhs, differ;
1065 otherwise returns \c false.
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.
1071 \sa operator==(), setNumberOptions()
1075 \enum QLocale::QuotationStyle
1077 This enum defines a set of possible styles for locale specific quotation.
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.
1091 \class QSystemLocale
1093 \brief The QSystemLocale class can be used to finetune the system locale
1099 \warning This class is only useful in very rare cases. Usually QLocale offers
1100 all the functionality required for application development.
1102 QSystemLocale allows to override the values provided by the system
1103 locale (QLocale::system()).
1109 \enum QSystemLocale::QueryType
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.
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.
1157 \fn QVariant QSystemLocale::query(QueryType type, QVariant &&in = QVariant()) const
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.
1163 \sa QSystemLocale::QueryType
1167 \fn QLocale QSystemLocale::fallbackLocale() const
1171 Returns the locale used if the system locale is not able to answer a query.
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.
1178 \class QSystemLocale::CurrencyToStringArgument
1181 A helper class that provides arguments for the QSystemLocale::query()
1182 function with query type QSystemLocale::CurrencyToString.
1184 \sa QSystemLocale::QueryType
1189 \fn QSystemLocale::CurrencyToStringArgument::CurrencyToStringArgument()
1193 \variable QSystemLocale::CurrencyToStringArgument::value
1195 An input value that should be converted to its string representation.
1196 Contains one of QMetaType::LongLong, QMetaType::ULongLong or QMetaType::Double
1200 \variable QSystemLocale::CurrencyToStringArgument::symbol
1202 An optional argument containing a currency symbol to be used in the
1207\fn QString QLocale::toString(long i) const
1215\fn QString QLocale::toString(ulong i) const
1223\fn QString QLocale::toString(ushort i) const
1232\fn QString QLocale::toString(short i) const
1240\fn QString QLocale::toString(int i) const
1248\fn QString QLocale::toString(uint i) const
1256\fn QString QLocale::toString(long i) const
1264\fn QString QLocale::toString(ulong i) const
1272\fn QString QLocale::toString(float f, char format = 'g', int precision = 6) const
1275Returns a string representing the floating-point number \a f.
1277The \a format and \a precision have the same meanings as described in \l
1278{toString(double, char, int)}.
1280\sa toFloat(), toDouble(), numberOptions(), exponential(), decimalPoint(), zeroDigit(),
1281 positiveSign(), percent(), toCurrencyString(), formattedDataSize(),
1282 QLocale::FloatingPointPrecisionOption
1286 \fn QString QLocale::toCurrencyString(short value, const QString &symbol) const
1292 \fn QString QLocale::toCurrencyString(ushort value, const QString &symbol) const
1298 \fn QString QLocale::toCurrencyString(int value, const QString &symbol) const
1304 \fn QString QLocale::toCurrencyString(uint value, const QString &symbol) const