1QLocale(3qt) QLocale(3qt)
2
3
4
6 QLocale - Converts between numbers and their string representations in
7 various languages
8
10 Almost all the functions in this class are reentrant when Qt is built
11 with thread support. The exception is setDefault(). </p>
12
13 #include <qlocale.h>
14
15 Public Members
16 enum Language { C = 1, Abkhazian = 2, Afan = 3, Afar = 4, Afrikaans =
17 5, Albanian = 6, Amharic = 7, Arabic = 8, Armenian = 9, Assamese =
18 10, Aymara = 11, Azerbaijani = 12, Bashkir = 13, Basque = 14,
19 Bengali = 15, Bhutani = 16, Bihari = 17, Bislama = 18, Breton = 19,
20 Bulgarian = 20, Burmese = 21, Byelorussian = 22, Cambodian = 23,
21 Catalan = 24, Chinese = 25, Corsican = 26, Croatian = 27, Czech =
22 28, Danish = 29, Dutch = 30, English = 31, Esperanto = 32, Estonian
23 = 33, Faroese = 34, FijiLanguage = 35, Finnish = 36, French = 37,
24 Frisian = 38, Gaelic = 39, Galician = 40, Georgian = 41, German =
25 42, Greek = 43, Greenlandic = 44, Guarani = 45, Gujarati = 46,
26 Hausa = 47, Hebrew = 48, Hindi = 49, Hungarian = 50, Icelandic =
27 51, Indonesian = 52, Interlingua = 53, Interlingue = 54, Inuktitut
28 = 55, Inupiak = 56, Irish = 57, Italian = 58, Japanese = 59,
29 Javanese = 60, Kannada = 61, Kashmiri = 62, Kazakh = 63,
30 Kinyarwanda = 64, Kirghiz = 65, Korean = 66, Kurdish = 67, Kurundi
31 = 68, Laothian = 69, Latin = 70, Latvian = 71, Lingala = 72,
32 Lithuanian = 73, Macedonian = 74, Malagasy = 75, Malay = 76,
33 Malayalam = 77, Maltese = 78, Maori = 79, Marathi = 80, Moldavian =
34 81, Mongolian = 82, NauruLanguage = 83, Nepali = 84, Norwegian =
35 85, Occitan = 86, Oriya = 87, Pashto = 88, Persian = 89, Polish =
36 90, Portuguese = 91, Punjabi = 92, Quechua = 93, RhaetoRomance =
37 94, Romanian = 95, Russian = 96, Samoan = 97, Sangho = 98, Sanskrit
38 = 99, Serbian = 100, SerboCroatian = 101, Sesotho = 102, Setswana =
39 103, Shona = 104, Sindhi = 105, Singhalese = 106, Siswati = 107,
40 Slovak = 108, Slovenian = 109, Somali = 110, Spanish = 111,
41 Sundanese = 112, Swahili = 113, Swedish = 114, Tagalog = 115, Tajik
42 = 116, Tamil = 117, Tatar = 118, Telugu = 119, Thai = 120, Tibetan
43 = 121, Tigrinya = 122, TongaLanguage = 123, Tsonga = 124, Turkish =
44 125, Turkmen = 126, Twi = 127, Uigur = 128, Ukrainian = 129, Urdu =
45 130, Uzbek = 131, Vietnamese = 132, Volapuk = 133, Welsh = 134,
46 Wolof = 135, Xhosa = 136, Yiddish = 137, Yoruba = 138, Zhuang =
47 139, Zulu = 140, LastLanguage = Zulu }
48 enum Country { AnyCountry = 0, Afghanistan = 1, Albania = 2, Algeria =
49 3, AmericanSamoa = 4, Andorra = 5, Angola = 6, Anguilla = 7,
50 Antarctica = 8, AntiguaAndBarbuda = 9, Argentina = 10, Armenia =
51 11, Aruba = 12, Australia = 13, Austria = 14, Azerbaijan = 15,
52 Bahamas = 16, Bahrain = 17, Bangladesh = 18, Barbados = 19, Belarus
53 = 20, Belgium = 21, Belize = 22, Benin = 23, Bermuda = 24, Bhutan =
54 25, Bolivia = 26, BosniaAndHerzegowina = 27, Botswana = 28,
55 BouvetIsland = 29, Brazil = 30, BritishIndianOceanTerritory = 31,
56 BruneiDarussalam = 32, Bulgaria = 33, BurkinaFaso = 34, Burundi =
57 35, Cambodia = 36, Cameroon = 37, Canada = 38, CapeVerde = 39,
58 CaymanIslands = 40, CentralAfricanRepublic = 41, Chad = 42, Chile =
59 43, China = 44, ChristmasIsland = 45, CocosIslands = 46, Colombia =
60 47, Comoros = 48, DemocraticRepublicOfCongo = 49,
61 PeoplesRepublicOfCongo = 50, CookIslands = 51, CostaRica = 52,
62 IvoryCoast = 53, Croatia = 54, Cuba = 55, Cyprus = 56,
63 CzechRepublic = 57, Denmark = 58, Djibouti = 59, Dominica = 60,
64 DominicanRepublic = 61, EastTimor = 62, Ecuador = 63, Egypt = 64,
65 ElSalvador = 65, EquatorialGuinea = 66, Eritrea = 67, Estonia = 68,
66 Ethiopia = 69, FalklandIslands = 70, FaroeIslands = 71, FijiCountry
67 = 72, Finland = 73, France = 74, MetropolitanFrance = 75,
68 FrenchGuiana = 76, FrenchPolynesia = 77, FrenchSouthernTerritories
69 = 78, Gabon = 79, Gambia = 80, Georgia = 81, Germany = 82, Ghana =
70 83, Gibraltar = 84, Greece = 85, Greenland = 86, Grenada = 87,
71 Guadeloupe = 88, Guam = 89, Guatemala = 90, Guinea = 91,
72 GuineaBissau = 92, Guyana = 93, Haiti = 94, HeardAndMcDonaldIslands
73 = 95, Honduras = 96, HongKong = 97, Hungary = 98, Iceland = 99,
74 India = 100, Indonesia = 101, Iran = 102, Iraq = 103, Ireland =
75 104, Israel = 105, Italy = 106, Jamaica = 107, Japan = 108, Jordan
76 = 109, Kazakhstan = 110, Kenya = 111, Kiribati = 112,
77 DemocraticRepublicOfKorea = 113, RepublicOfKorea = 114, Kuwait =
78 115, Kyrgyzstan = 116, Lao = 117, Latvia = 118, Lebanon = 119,
79 Lesotho = 120, Liberia = 121, LibyanArabJamahiriya = 122,
80 Liechtenstein = 123, Lithuania = 124, Luxembourg = 125, Macau =
81 126, Macedonia = 127, Madagascar = 128, Malawi = 129, Malaysia =
82 130, Maldives = 131, Mali = 132, Malta = 133, MarshallIslands =
83 134, Martinique = 135, Mauritania = 136, Mauritius = 137, Mayotte =
84 138, Mexico = 139, Micronesia = 140, Moldova = 141, Monaco = 142,
85 Mongolia = 143, Montserrat = 144, Morocco = 145, Mozambique = 146,
86 Myanmar = 147, Namibia = 148, NauruCountry = 149, Nepal = 150,
87 Netherlands = 151, NetherlandsAntilles = 152, NewCaledonia = 153,
88 NewZealand = 154, Nicaragua = 155, Niger = 156, Nigeria = 157, Niue
89 = 158, NorfolkIsland = 159, NorthernMarianaIslands = 160, Norway =
90 161, Oman = 162, Pakistan = 163, Palau = 164, PalestinianTerritory
91 = 165, Panama = 166, PapuaNewGuinea = 167, Paraguay = 168, Peru =
92 169, Philippines = 170, Pitcairn = 171, Poland = 172, Portugal =
93 173, PuertoRico = 174, Qatar = 175, Reunion = 176, Romania = 177,
94 RussianFederation = 178, Rwanda = 179, SaintKittsAndNevis = 180,
95 StLucia = 181, StVincentAndTheGrenadines = 182, Samoa = 183,
96 SanMarino = 184, SaoTomeAndPrincipe = 185, SaudiArabia = 186,
97 Senegal = 187, Seychelles = 188, SierraLeone = 189, Singapore =
98 190, Slovakia = 191, Slovenia = 192, SolomonIslands = 193, Somalia
99 = 194, SouthAfrica = 195, SouthGeorgiaAndTheSouthSandwichIslands =
100 196, Spain = 197, SriLanka = 198, StHelena = 199,
101 StPierreAndMiquelon = 200, Sudan = 201, Suriname = 202,
102 SvalbardAndJanMayenIslands = 203, Swaziland = 204, Sweden = 205,
103 Switzerland = 206, SyrianArabRepublic = 207, Taiwan = 208,
104 Tajikistan = 209, Tanzania = 210, Thailand = 211, Togo = 212,
105 Tokelau = 213, TongaCountry = 214, TrinidadAndTobago = 215, Tunisia
106 = 216, Turkey = 217, Turkmenistan = 218, TurksAndCaicosIslands =
107 219, Tuvalu = 220, Uganda = 221, Ukraine = 222, UnitedArabEmirates
108 = 223, UnitedKingdom = 224, UnitedStates = 225,
109 UnitedStatesMinorOutlyingIslands = 226, Uruguay = 227, Uzbekistan =
110 228, Vanuatu = 229, VaticanCityState = 230, Venezuela = 231,
111 VietNam = 232, BritishVirginIslands = 233, USVirginIslands = 234,
112 WallisAndFutunaIslands = 235, WesternSahara = 236, Yemen = 237,
113 Yugoslavia = 238, Zambia = 239, Zimbabwe = 240, LastCountry =
114 Zimbabwe }
115 QLocale ()
116 QLocale ( const QString & name )
117 QLocale ( Language language, Country country = AnyCountry )
118 QLocale ( const QLocale & other )
119 QLocale & operator= ( const QLocale & other )
120 Language language () const
121 Country country () const
122 QString name () const
123 short toShort ( const QString & s, bool * ok = 0 ) const
124 ushort toUShort ( const QString & s, bool * ok = 0 ) const
125 int toInt ( const QString & s, bool * ok = 0 ) const
126 uint toUInt ( const QString & s, bool * ok = 0 ) const
127 Q_LONG toLong ( const QString & s, bool * ok = 0 ) const
128 Q_ULONG toULong ( const QString & s, bool * ok = 0 ) const
129 Q_LLONG toLongLong ( const QString & s, bool * ok = 0 ) const
130 Q_ULLONG toULongLong ( const QString & s, bool * ok = 0 ) const
131 float toFloat ( const QString & s, bool * ok = 0 ) const
132 double toDouble ( const QString & s, bool * ok = 0 ) const
133 QString toString ( short i ) const
134 QString toString ( ushort i ) const
135 QString toString ( int i ) const
136 QString toString ( uint i ) const
137 QString toString ( Q_LONG i ) const
138 QString toString ( Q_ULONG i ) const
139 QString toString ( Q_LLONG i ) const
140 QString toString ( Q_ULLONG i ) const
141 QString toString ( float i, char f = 'g', int prec = 6 ) const
142 QString toString ( double i, char f = 'g', int prec = 6 ) const
143
144 Static Public Members
145 QString languageToString ( Language language )
146 QString countryToString ( Country country )
147 void setDefault ( const QLocale & locale )
148 QLocale c ()
149 QLocale system ()
150
152 The QLocale class converts between numbers and their string
153 representations in various languages.
154
155 It is initialized with a country/language pair in its constructor and
156 offers number-to-string and string-to-number conversion functions
157 simmilar to those in QString.
158
159 QLocale egyptian(QLocale::Arabic, QLocale::Egypt);
160 QString s1 = egyptian.toString(1.571429E+07, 'e');
161 QString s2 = egyptian.toString(10);
162 double d = egyptian.toDouble(s1);
163 int s2 = egyptian.toInt(s2);
164
165 QLocale supports the concept of a default locale, which is determined
166 from the system's locale settings at application startup. The default
167 locale can be changed by calling the static member setDefault(). The
168 default locale has the following effects:
169
170 If a QLocale object is constructed with the default constructor, it
171 will use the default locale's settings.
172
173 QString::toDouble() interprets the string according to the default
174 locale. If this fails, it falls back on the "C" locale.
175
176 QString::arg() uses the default locale to format a number when its
177 position specifier in the format string contains an 'L', e.g. "%L1".
178
179 QLocale::setDefault(QLocale(QLocale::Hebrew, QLocale::Israel));
180 QLocale hebrew; // Constructs a default QLocale
181 QString s1 = hebrew.toString(15714.3, 'e');
182 bool ok;
183 double d;
184 QLocale::setDefault(QLocale::C);
185 d = QString( "1234,56" ).toDouble(&ok); // ok == false
186 d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
187 QLocale::setDefault(QLocale::German);
188 d = QString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
189 d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
190 QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
191 str = QString( "%1 %L2 %L3" )
192 .arg( 12345 )
193 .arg( 12345 )
194 .arg( 12345, 0, 16 );
195 // str == "12345 12,345 3039"
196
197 When a language/country pair is specified in the constructor, one of
198 three things can happen:
199
200 If the language/country pair is found in the database, it is used.
201
202 If the language is found but the country is not, or if the country is
203 AnyCountry, the language is used with the most appropriate available
204 country (for example, Germany for German),
205
206 If neither the language nor the country are found, QLocale defaults to
207 the default locale (see setDefault()).
208
209 The "C" locale is identical to English/UnitedStates.
210
211 Use language() and country() to determine the actual language and
212 country values used.
213
214 An alternative method for constructing a QLocale object is by
215 specifying the locale name.
216
217 QLocale korean("ko");
218 QLocale swiss("de_CH");
219
220 This constructor converts the locale name to a language/country pair;
221 it does not use the system locale database.
222
223 All the methods in QLocale, with the exception of setDefault(), are
224 reentrant.
225
226 See also QString::toDouble(), QString::arg(), and Text Related Classes.
227
228 The double-to-string and string-to-double conversion functions are
229 covered by the following licenses:
230
231 Copyright (c) 1991 by AT&T.
232
233 Permission to use, copy, modify, and distribute this software for any
234 purpose without fee is hereby granted, provided that this entire notice
235 is included in all copies of any software which is or includes a copy
236 or modification of this software and in all copies of the supporting
237 documentation for such software.
238
239 THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
240 WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
241 REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
242 OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
243
244 This product includes software developed by the University of
245 California, Berkeley and its contributors.
246
247 Member Type Documentation
249 This enumerated type is used to specify a country.
250
251 QLocale::AnyCountry
252
253 QLocale::Afghanistan
254
255 QLocale::Albania
256
257 QLocale::Algeria
258
259 QLocale::AmericanSamoa
260
261 QLocale::Andorra
262
263 QLocale::Angola
264
265 QLocale::Anguilla
266
267 QLocale::Antarctica
268
269 QLocale::AntiguaAndBarbuda
270
271 QLocale::Argentina
272
273 QLocale::Armenia
274
275 QLocale::Aruba
276
277 QLocale::Australia
278
279 QLocale::Austria
280
281 QLocale::Azerbaijan
282
283 QLocale::Bahamas
284
285 QLocale::Bahrain
286
287 QLocale::Bangladesh
288
289 QLocale::Barbados
290
291 QLocale::Belarus
292
293 QLocale::Belgium
294
295 QLocale::Belize
296
297 QLocale::Benin
298
299 QLocale::Bermuda
300
301 QLocale::Bhutan
302
303 QLocale::Bolivia
304
305 QLocale::BosniaAndHerzegowina
306
307 QLocale::Botswana
308
309 QLocale::BouvetIsland
310
311 QLocale::Brazil
312
313 QLocale::BritishIndianOceanTerritory
314
315 QLocale::BruneiDarussalam
316
317 QLocale::Bulgaria
318
319 QLocale::BurkinaFaso
320
321 QLocale::Burundi
322
323 QLocale::Cambodia
324
325 QLocale::Cameroon
326
327 QLocale::Canada
328
329 QLocale::CapeVerde
330
331 QLocale::CaymanIslands
332
333 QLocale::CentralAfricanRepublic
334
335 QLocale::Chad
336
337 QLocale::Chile
338
339 QLocale::China
340
341 QLocale::ChristmasIsland
342
343 QLocale::CocosIslands
344
345 QLocale::Colombia
346
347 QLocale::Comoros
348
349 QLocale::DemocraticRepublicOfCongo
350
351 QLocale::PeoplesRepublicOfCongo
352
353 QLocale::CookIslands
354
355 QLocale::CostaRica
356
357 QLocale::IvoryCoast
358
359 QLocale::Croatia
360
361 QLocale::Cuba
362
363 QLocale::Cyprus
364
365 QLocale::CzechRepublic
366
367 QLocale::Denmark
368
369 QLocale::Djibouti
370
371 QLocale::Dominica
372
373 QLocale::DominicanRepublic
374
375 QLocale::EastTimor
376
377 QLocale::Ecuador
378
379 QLocale::Egypt
380
381 QLocale::ElSalvador
382
383 QLocale::EquatorialGuinea
384
385 QLocale::Eritrea
386
387 QLocale::Estonia
388
389 QLocale::Ethiopia
390
391 QLocale::FalklandIslands
392
393 QLocale::FaroeIslands
394
395 QLocale::FijiCountry
396
397 QLocale::Finland
398
399 QLocale::France
400
401 QLocale::MetropolitanFrance
402
403 QLocale::FrenchGuiana
404
405 QLocale::FrenchPolynesia
406
407 QLocale::FrenchSouthernTerritories
408
409 QLocale::Gabon
410
411 QLocale::Gambia
412
413 QLocale::Georgia
414
415 QLocale::Germany
416
417 QLocale::Ghana
418
419 QLocale::Gibraltar
420
421 QLocale::Greece
422
423 QLocale::Greenland
424
425 QLocale::Grenada
426
427 QLocale::Guadeloupe
428
429 QLocale::Guam
430
431 QLocale::Guatemala
432
433 QLocale::Guinea
434
435 QLocale::GuineaBissau
436
437 QLocale::Guyana
438
439 QLocale::Haiti
440
441 QLocale::HeardAndMcDonaldIslands
442
443 QLocale::Honduras
444
445 QLocale::HongKong
446
447 QLocale::Hungary
448
449 QLocale::Iceland
450
451 QLocale::India
452
453 QLocale::Indonesia
454
455 QLocale::Iran
456
457 QLocale::Iraq
458
459 QLocale::Ireland
460
461 QLocale::Israel
462
463 QLocale::Italy
464
465 QLocale::Jamaica
466
467 QLocale::Japan
468
469 QLocale::Jordan
470
471 QLocale::Kazakhstan
472
473 QLocale::Kenya
474
475 QLocale::Kiribati
476
477 QLocale::DemocraticRepublicOfKorea
478
479 QLocale::RepublicOfKorea
480
481 QLocale::Kuwait
482
483 QLocale::Kyrgyzstan
484
485 QLocale::Lao
486
487 QLocale::Latvia
488
489 QLocale::Lebanon
490
491 QLocale::Lesotho
492
493 QLocale::Liberia
494
495 QLocale::LibyanArabJamahiriya
496
497 QLocale::Liechtenstein
498
499 QLocale::Lithuania
500
501 QLocale::Luxembourg
502
503 QLocale::Macau
504
505 QLocale::Macedonia
506
507 QLocale::Madagascar
508
509 QLocale::Malawi
510
511 QLocale::Malaysia
512
513 QLocale::Maldives
514
515 QLocale::Mali
516
517 QLocale::Malta
518
519 QLocale::MarshallIslands
520
521 QLocale::Martinique
522
523 QLocale::Mauritania
524
525 QLocale::Mauritius
526
527 QLocale::Mayotte
528
529 QLocale::Mexico
530
531 QLocale::Micronesia
532
533 QLocale::Moldova
534
535 QLocale::Monaco
536
537 QLocale::Mongolia
538
539 QLocale::Montserrat
540
541 QLocale::Morocco
542
543 QLocale::Mozambique
544
545 QLocale::Myanmar
546
547 QLocale::Namibia
548
549 QLocale::NauruCountry
550
551 QLocale::Nepal
552
553 QLocale::Netherlands
554
555 QLocale::NetherlandsAntilles
556
557 QLocale::NewCaledonia
558
559 QLocale::NewZealand
560
561 QLocale::Nicaragua
562
563 QLocale::Niger
564
565 QLocale::Nigeria
566
567 QLocale::Niue
568
569 QLocale::NorfolkIsland
570
571 QLocale::NorthernMarianaIslands
572
573 QLocale::Norway
574
575 QLocale::Oman
576
577 QLocale::Pakistan
578
579 QLocale::Palau
580
581 QLocale::PalestinianTerritory
582
583 QLocale::Panama
584
585 QLocale::PapuaNewGuinea
586
587 QLocale::Paraguay
588
589 QLocale::Peru
590
591 QLocale::Philippines
592
593 QLocale::Pitcairn
594
595 QLocale::Poland
596
597 QLocale::Portugal
598
599 QLocale::PuertoRico
600
601 QLocale::Qatar
602
603 QLocale::Reunion
604
605 QLocale::Romania
606
607 QLocale::RussianFederation
608
609 QLocale::Rwanda
610
611 QLocale::SaintKittsAndNevis
612
613 QLocale::StLucia
614
615 QLocale::StVincentAndTheGrenadines
616
617 QLocale::Samoa
618
619 QLocale::SanMarino
620
621 QLocale::SaoTomeAndPrincipe
622
623 QLocale::SaudiArabia
624
625 QLocale::Senegal
626
627 QLocale::Seychelles
628
629 QLocale::SierraLeone
630
631 QLocale::Singapore
632
633 QLocale::Slovakia
634
635 QLocale::Slovenia
636
637 QLocale::SolomonIslands
638
639 QLocale::Somalia
640
641 QLocale::SouthAfrica
642
643 QLocale::SouthGeorgiaAndTheSouthSandwichIslands
644
645 QLocale::Spain
646
647 QLocale::SriLanka
648
649 QLocale::StHelena
650
651 QLocale::StPierreAndMiquelon
652
653 QLocale::Sudan
654
655 QLocale::Suriname
656
657 QLocale::SvalbardAndJanMayenIslands
658
659 QLocale::Swaziland
660
661 QLocale::Sweden
662
663 QLocale::Switzerland
664
665 QLocale::SyrianArabRepublic
666
667 QLocale::Taiwan
668
669 QLocale::Tajikistan
670
671 QLocale::Tanzania
672
673 QLocale::Thailand
674
675 QLocale::Togo
676
677 QLocale::Tokelau
678
679 QLocale::TongaCountry
680
681 QLocale::TrinidadAndTobago
682
683 QLocale::Tunisia
684
685 QLocale::Turkey
686
687 QLocale::Turkmenistan
688
689 QLocale::TurksAndCaicosIslands
690
691 QLocale::Tuvalu
692
693 QLocale::Uganda
694
695 QLocale::Ukraine
696
697 QLocale::UnitedArabEmirates
698
699 QLocale::UnitedKingdom
700
701 QLocale::UnitedStates
702
703 QLocale::UnitedStatesMinorOutlyingIslands
704
705 QLocale::Uruguay
706
707 QLocale::Uzbekistan
708
709 QLocale::Vanuatu
710
711 QLocale::VaticanCityState
712
713 QLocale::Venezuela
714
715 QLocale::VietNam
716
717 QLocale::BritishVirginIslands
718
719 QLocale::USVirginIslands
720
721 QLocale::WallisAndFutunaIslands
722
723 QLocale::WesternSahara
724
725 QLocale::Yemen
726
727 QLocale::Yugoslavia
728
729 QLocale::Zambia
730
731 QLocale::Zimbabwe
732
734 This enumerated type is used to specify a language.
735
736 QLocale::C - Identical to English/UnitedStates
737
738 QLocale::Abkhazian
739
740 QLocale::Afan
741
742 QLocale::Afar
743
744 QLocale::Afrikaans
745
746 QLocale::Albanian
747
748 QLocale::Amharic
749
750 QLocale::Arabic
751
752 QLocale::Armenian
753
754 QLocale::Assamese
755
756 QLocale::Aymara
757
758 QLocale::Azerbaijani
759
760 QLocale::Bashkir
761
762 QLocale::Basque
763
764 QLocale::Bengali
765
766 QLocale::Bhutani
767
768 QLocale::Bihari
769
770 QLocale::Bislama
771
772 QLocale::Breton
773
774 QLocale::Bulgarian
775
776 QLocale::Burmese
777
778 QLocale::Byelorussian
779
780 QLocale::Cambodian
781
782 QLocale::Catalan
783
784 QLocale::Chinese
785
786 QLocale::Corsican
787
788 QLocale::Croatian
789
790 QLocale::Czech
791
792 QLocale::Danish
793
794 QLocale::Dutch
795
796 QLocale::English
797
798 QLocale::Esperanto
799
800 QLocale::Estonian
801
802 QLocale::Faroese
803
804 QLocale::FijiLanguage
805
806 QLocale::Finnish
807
808 QLocale::French
809
810 QLocale::Frisian
811
812 QLocale::Gaelic
813
814 QLocale::Galician
815
816 QLocale::Georgian
817
818 QLocale::German
819
820 QLocale::Greek
821
822 QLocale::Greenlandic
823
824 QLocale::Guarani
825
826 QLocale::Gujarati
827
828 QLocale::Hausa
829
830 QLocale::Hebrew
831
832 QLocale::Hindi
833
834 QLocale::Hungarian
835
836 QLocale::Icelandic
837
838 QLocale::Indonesian
839
840 QLocale::Interlingua
841
842 QLocale::Interlingue
843
844 QLocale::Inuktitut
845
846 QLocale::Inupiak
847
848 QLocale::Irish
849
850 QLocale::Italian
851
852 QLocale::Japanese
853
854 QLocale::Javanese
855
856 QLocale::Kannada
857
858 QLocale::Kashmiri
859
860 QLocale::Kazakh
861
862 QLocale::Kinyarwanda
863
864 QLocale::Kirghiz
865
866 QLocale::Korean
867
868 QLocale::Kurdish
869
870 QLocale::Kurundi
871
872 QLocale::Laothian
873
874 QLocale::Latin
875
876 QLocale::Latvian
877
878 QLocale::Lingala
879
880 QLocale::Lithuanian
881
882 QLocale::Macedonian
883
884 QLocale::Malagasy
885
886 QLocale::Malay
887
888 QLocale::Malayalam
889
890 QLocale::Maltese
891
892 QLocale::Maori
893
894 QLocale::Marathi
895
896 QLocale::Moldavian
897
898 QLocale::Mongolian
899
900 QLocale::NauruLanguage
901
902 QLocale::Nepali
903
904 QLocale::Norwegian
905
906 QLocale::Occitan
907
908 QLocale::Oriya
909
910 QLocale::Pashto
911
912 QLocale::Persian
913
914 QLocale::Polish
915
916 QLocale::Portuguese
917
918 QLocale::Punjabi
919
920 QLocale::Quechua
921
922 QLocale::RhaetoRomance
923
924 QLocale::Romanian
925
926 QLocale::Russian
927
928 QLocale::Samoan
929
930 QLocale::Sangho
931
932 QLocale::Sanskrit
933
934 QLocale::Serbian
935
936 QLocale::SerboCroatian
937
938 QLocale::Sesotho
939
940 QLocale::Setswana
941
942 QLocale::Shona
943
944 QLocale::Sindhi
945
946 QLocale::Singhalese
947
948 QLocale::Siswati
949
950 QLocale::Slovak
951
952 QLocale::Slovenian
953
954 QLocale::Somali
955
956 QLocale::Spanish
957
958 QLocale::Sundanese
959
960 QLocale::Swahili
961
962 QLocale::Swedish
963
964 QLocale::Tagalog
965
966 QLocale::Tajik
967
968 QLocale::Tamil
969
970 QLocale::Tatar
971
972 QLocale::Telugu
973
974 QLocale::Thai
975
976 QLocale::Tibetan
977
978 QLocale::Tigrinya
979
980 QLocale::TongaLanguage
981
982 QLocale::Tsonga
983
984 QLocale::Turkish
985
986 QLocale::Turkmen
987
988 QLocale::Twi
989
990 QLocale::Uigur
991
992 QLocale::Ukrainian
993
994 QLocale::Urdu
995
996 QLocale::Uzbek
997
998 QLocale::Vietnamese
999
1000 QLocale::Volapuk
1001
1002 QLocale::Welsh
1003
1004 QLocale::Wolof
1005
1006 QLocale::Xhosa
1007
1008 QLocale::Yiddish
1009
1010 QLocale::Yoruba
1011
1012 QLocale::Zhuang
1013
1014 QLocale::Zulu
1015
1018 Constructs a QLocale object initialized with the default locale.
1019
1020 See also setDefault().
1021
1023 Constructs a QLocale object with the specified name, which has the
1024 format" language[_country][.codeset][@modifier]" or "C", where:
1025
1026 language is a lowercase, two-letter, ISO 639 language code,
1027
1028 territory is an uppercase, two-letter, ISO 3166 country code,
1029
1030 and codeset and modifier are ignored.
1031
1032 If the string violates the locale format, or language is not a valid
1033 ISO 369 code, the "C" locale is used instead. If country is not
1034 present, or is not a valid ISO 3166 code, the most appropriate country
1035 is chosen for the specified language.
1036
1037 The language and country codes are converted to their respective
1038 Language and Country enums. After this conversion is performed the
1039 constructor behaves exactly like QLocale(Country, Language).
1040
1041 This constructor is much slower than QLocale(Country, Language).
1042
1043 See also name().
1044
1046 Constructs a QLocale object with the specified language and country.
1047
1048 If the language/country pair is found in the database, it is used.
1049
1050 If the language is found but the country is not, or if the country is
1051 AnyCountry, the language is used with the most appropriate available
1052 country (for example, Germany for German),
1053
1054 If neither the language nor the country are found, QLocale defaults to
1055 the default locale (see setDefault()).
1056
1057 The language and country that are actually used can be queried using
1058 language() and country().
1059
1060 See also setDefault(), language(), and country().
1061
1063 Constructs a QLocale object as a copy of other.
1064
1066 Returns a QLocale object initialized to the "C" locale.
1067
1068 See also system().
1069
1071 Returns the country of this locale.
1072
1073 See also QLocale().
1074
1076 Returns a QString containing the name of country.
1077
1079 Returns the language of this locale.
1080
1081 See also QLocale().
1082
1084 Returns a QString containing the name of language.
1085
1087 Returns the language and country of this locale as a string of the form
1088 "language_country", where language is a lowercase, two-letter ISO 639
1089 language code, and country is an uppercase, two-letter ISO 3166 country
1090 code.
1091
1092 See also QLocale().
1093
1095 Assigns other to this QLocale object and returns a reference to this
1096 QLocale object.
1097
1099 Warning: This function is not reentrant.</p>
1100
1101 Sets the global default locale to locale. These values are used when a
1102 QLocale object is constructed with no arguments. If this function is
1103 not called, the system's locale is used.
1104
1105 Warning: In a multithreaded application, the default locale should be
1106 set at application startup, before any non-GUI threads are created.
1107
1108 See also system() and c().
1109
1111 Returns a QLocale object initialized to the system locale.
1112
1114 Returns the double represented by the localized string s, or 0.0 if the
1115 conversion failed.
1116
1117 If ok is not 0, reports failure by setting *ok to false and success by
1118 setting *ok to true.
1119
1120 Unlike QString::toDouble(), this function does not fall back to the "C"
1121 locale if the string cannot be interpreted in this locale.
1122
1123 bool ok;
1124 double d;
1125 QLocale c(QLocale::C);
1126 d = c.toDouble( "1234.56", &ok ); // ok == true, d == 1234.56
1127 d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56
1128 d = c.toDouble( "1234,56", &ok ); // ok == false
1129 QLocale german(QLocale::German);
1130 d = german.toDouble( "1234,56", &ok ); // ok == true, d == 1234.56
1131 d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56
1132 d = german.toDouble( "1234.56", &ok ); // ok == false
1133 d = german.toDouble( "1.234", &ok ); // ok == true, d == 1234.0
1134
1135 Notice that the last conversion returns 1234.0, because '.' is the
1136 thousands group separator in the German locale.
1137
1138 This function ignores leading and trailing whitespace.
1139
1140 See also toString() and QString::toDouble().
1141
1143 Returns the float represented by the localized string s, or 0.0 if the
1144 conversion failed.
1145
1146 If ok is not 0, reports failure by setting *ok to false and success by
1147 setting *ok to true.
1148
1149 This function ignores leading and trailing whitespace.
1150
1151 See also toString().
1152
1154 Returns the int represented by the localized string s, or 0 if the
1155 conversion failed.
1156
1157 If ok is not 0, reports failure by setting *ok to false and success by
1158 setting *ok to true.
1159
1160 This function ignores leading and trailing whitespace.
1161
1162 See also toString().
1163
1165 Returns the long int represented by the localized string s, or 0 if the
1166 conversion failed.
1167
1168 If ok is not 0, reports failure by setting *ok to false and success by
1169 setting *ok to true.
1170
1171 This function ignores leading and trailing whitespace.
1172
1173 See also toString().
1174
1176 Returns the long long int represented by the localized string s, or 0
1177 if the conversion failed.
1178
1179 If ok is not 0, reports failure by setting *ok to false and success by
1180 setting *ok to true.
1181
1182 This function ignores leading and trailing whitespace.
1183
1184 See also toString().
1185
1187 Returns the short int represented by the localized string s, or 0 if
1188 the conversion failed.
1189
1190 If ok is not 0, reports failure by setting *ok to false and success by
1191 setting *ok to true.
1192
1193 This function ignores leading and trailing whitespace.
1194
1195 See also toString().
1196
1198 Returns a localized string representation of i.
1199
1200 See also toLongLong().
1201
1203 This is an overloaded member function, provided for convenience. It
1204 behaves essentially like the above function.
1205
1206 See also toShort().
1207
1209 This is an overloaded member function, provided for convenience. It
1210 behaves essentially like the above function.
1211
1212 See also toUShort().
1213
1215 This is an overloaded member function, provided for convenience. It
1216 behaves essentially like the above function.
1217
1218 See also toInt().
1219
1221 This is an overloaded member function, provided for convenience. It
1222 behaves essentially like the above function.
1223
1224 See also toUInt().
1225
1227 This is an overloaded member function, provided for convenience. It
1228 behaves essentially like the above function.
1229
1230 See also toLong().
1231
1233 This is an overloaded member function, provided for convenience. It
1234 behaves essentially like the above function.
1235
1236 See also toULong().
1237
1239 This is an overloaded member function, provided for convenience. It
1240 behaves essentially like the above function.
1241
1242 See also toULongLong().
1243
1245 This is an overloaded member function, provided for convenience. It
1246 behaves essentially like the above function.
1247
1248 f and prec have the same meaning as in QString::number(double, char,
1249 int).
1250
1251 See also toDouble().
1252
1254 This is an overloaded member function, provided for convenience. It
1255 behaves essentially like the above function.
1256
1257 f and prec have the same meaning as in QString::number(double, char,
1258 int).
1259
1260 See also toDouble().
1261
1263 Returns the unsigned int represented by the localized string s, or 0 if
1264 the conversion failed.
1265
1266 If ok is not 0, reports failure by setting *ok to false and success by
1267 setting *ok to true.
1268
1269 This function ignores leading and trailing whitespace.
1270
1271 See also toString().
1272
1274 Returns the unsigned long int represented by the localized string s, or
1275 0 if the conversion failed.
1276
1277 If ok is not 0, reports failure by setting *ok to false and success by
1278 setting *ok to true.
1279
1280 This function ignores leading and trailing whitespace.
1281
1282 See also toString().
1283
1285 Returns the unsigned long long int represented by the localized string
1286 s, or 0 if the conversion failed.
1287
1288 If ok is not 0, reports failure by setting *ok to false and success by
1289 setting *ok to true.
1290
1291 This function ignores leading and trailing whitespace.
1292
1293 See also toString().
1294
1296 Returns the unsigned short int represented by the localized string s,
1297 or 0 if the conversion failed.
1298
1299 If ok is not 0, reports failure by setting *ok to false and success by
1300 setting *ok to true.
1301
1302 This function ignores leading and trailing whitespace.
1303
1304 See also toString().
1305
1306
1308 http://doc.trolltech.com/qlocale.html
1309 http://www.trolltech.com/faq/tech.html
1310
1312 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
1313 license file included in the distribution for a complete license
1314 statement.
1315
1317 Generated automatically from the source code.
1318
1320 If you find a bug in Qt, please report it as described in
1321 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
1322 help you. Thank you.
1323
1324 The definitive Qt documentation is provided in HTML format; it is
1325 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
1326 web browser. This man page is provided as a convenience for those users
1327 who prefer man pages, although this format is not officially supported
1328 by Trolltech.
1329
1330 If you find errors in this manual page, please report them to qt-
1331 bugs@trolltech.com. Please include the name of the manual page
1332 (qlocale.3qt) and the Qt version (3.3.8).
1333
1334
1335
1336Trolltech AS 2 February 2007 QLocale(3qt)