1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/tools/qlocale.cpp:1921 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QLocale Class</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QLocale Class Reference</h1>
|
---|
33 |
|
---|
34 | <p>The QLocale class converts between numbers and their
|
---|
35 | string representations in various languages.
|
---|
36 | <a href="#details">More...</a>
|
---|
37 | <p>Almost all the functions in this class are <a href="threads.html#reentrant">reentrant</a> when Qt is built with thread support. The exception is <a href="#setDefault"><b>setDefault</b></a>().
|
---|
38 | </p><p><tt>#include <<a href="qlocale-h.html">qlocale.h</a>></tt>
|
---|
39 | <p><a href="qlocale-members.html">List of all member functions.</a>
|
---|
40 | <h2>Public Members</h2>
|
---|
41 | <ul>
|
---|
42 | <li class=fn>enum <a href="#Language-enum"><b>Language</b></a> { C = 1, Abkhazian = 2, Afan = 3, Afar = 4, Afrikaans = 5, Albanian = 6, Amharic = 7, Arabic = 8, Armenian = 9, Assamese = 10, Aymara = 11, Azerbaijani = 12, Bashkir = 13, Basque = 14, Bengali = 15, Bhutani = 16, Bihari = 17, Bislama = 18, Breton = 19, Bulgarian = 20, Burmese = 21, Byelorussian = 22, Cambodian = 23, Catalan = 24, Chinese = 25, Corsican = 26, Croatian = 27, Czech = 28, Danish = 29, Dutch = 30, English = 31, Esperanto = 32, Estonian = 33, Faroese = 34, FijiLanguage = 35, Finnish = 36, French = 37, Frisian = 38, Gaelic = 39, Galician = 40, Georgian = 41, German = 42, Greek = 43, Greenlandic = 44, Guarani = 45, Gujarati = 46, Hausa = 47, Hebrew = 48, Hindi = 49, Hungarian = 50, Icelandic = 51, Indonesian = 52, Interlingua = 53, Interlingue = 54, Inuktitut = 55, Inupiak = 56, Irish = 57, Italian = 58, Japanese = 59, Javanese = 60, Kannada = 61, Kashmiri = 62, Kazakh = 63, Kinyarwanda = 64, Kirghiz = 65, Korean = 66, Kurdish = 67, Kurundi = 68, Laothian = 69, Latin = 70, Latvian = 71, Lingala = 72, Lithuanian = 73, Macedonian = 74, Malagasy = 75, Malay = 76, Malayalam = 77, Maltese = 78, Maori = 79, Marathi = 80, Moldavian = 81, Mongolian = 82, NauruLanguage = 83, Nepali = 84, Norwegian = 85, Occitan = 86, Oriya = 87, Pashto = 88, Persian = 89, Polish = 90, Portuguese = 91, Punjabi = 92, Quechua = 93, RhaetoRomance = 94, Romanian = 95, Russian = 96, Samoan = 97, Sangho = 98, Sanskrit = 99, Serbian = 100, SerboCroatian = 101, Sesotho = 102, Setswana = 103, Shona = 104, Sindhi = 105, Singhalese = 106, Siswati = 107, Slovak = 108, Slovenian = 109, Somali = 110, Spanish = 111, Sundanese = 112, Swahili = 113, Swedish = 114, Tagalog = 115, Tajik = 116, Tamil = 117, Tatar = 118, Telugu = 119, Thai = 120, Tibetan = 121, Tigrinya = 122, TongaLanguage = 123, Tsonga = 124, Turkish = 125, Turkmen = 126, Twi = 127, Uigur = 128, Ukrainian = 129, Urdu = 130, Uzbek = 131, Vietnamese = 132, Volapuk = 133, Welsh = 134, Wolof = 135, Xhosa = 136, Yiddish = 137, Yoruba = 138, Zhuang = 139, Zulu = 140, LastLanguage = Zulu }</li>
|
---|
43 | <li class=fn>enum <a href="#Country-enum"><b>Country</b></a> { AnyCountry = 0, Afghanistan = 1, Albania = 2, Algeria = 3, AmericanSamoa = 4, Andorra = 5, Angola = 6, Anguilla = 7, Antarctica = 8, AntiguaAndBarbuda = 9, Argentina = 10, Armenia = 11, Aruba = 12, Australia = 13, Austria = 14, Azerbaijan = 15, Bahamas = 16, Bahrain = 17, Bangladesh = 18, Barbados = 19, Belarus = 20, Belgium = 21, Belize = 22, Benin = 23, Bermuda = 24, Bhutan = 25, Bolivia = 26, BosniaAndHerzegowina = 27, Botswana = 28, BouvetIsland = 29, Brazil = 30, BritishIndianOceanTerritory = 31, BruneiDarussalam = 32, Bulgaria = 33, BurkinaFaso = 34, Burundi = 35, Cambodia = 36, Cameroon = 37, Canada = 38, CapeVerde = 39, CaymanIslands = 40, CentralAfricanRepublic = 41, Chad = 42, Chile = 43, China = 44, ChristmasIsland = 45, CocosIslands = 46, Colombia = 47, Comoros = 48, DemocraticRepublicOfCongo = 49, PeoplesRepublicOfCongo = 50, CookIslands = 51, CostaRica = 52, IvoryCoast = 53, Croatia = 54, Cuba = 55, Cyprus = 56, CzechRepublic = 57, Denmark = 58, Djibouti = 59, Dominica = 60, DominicanRepublic = 61, EastTimor = 62, Ecuador = 63, Egypt = 64, ElSalvador = 65, EquatorialGuinea = 66, Eritrea = 67, Estonia = 68, Ethiopia = 69, FalklandIslands = 70, FaroeIslands = 71, FijiCountry = 72, Finland = 73, France = 74, MetropolitanFrance = 75, FrenchGuiana = 76, FrenchPolynesia = 77, FrenchSouthernTerritories = 78, Gabon = 79, Gambia = 80, Georgia = 81, Germany = 82, Ghana = 83, Gibraltar = 84, Greece = 85, Greenland = 86, Grenada = 87, Guadeloupe = 88, Guam = 89, Guatemala = 90, Guinea = 91, GuineaBissau = 92, Guyana = 93, Haiti = 94, HeardAndMcDonaldIslands = 95, Honduras = 96, HongKong = 97, Hungary = 98, Iceland = 99, India = 100, Indonesia = 101, Iran = 102, Iraq = 103, Ireland = 104, Israel = 105, Italy = 106, Jamaica = 107, Japan = 108, Jordan = 109, Kazakhstan = 110, Kenya = 111, Kiribati = 112, DemocraticRepublicOfKorea = 113, RepublicOfKorea = 114, Kuwait = 115, Kyrgyzstan = 116, Lao = 117, Latvia = 118, Lebanon = 119, Lesotho = 120, Liberia = 121, LibyanArabJamahiriya = 122, Liechtenstein = 123, Lithuania = 124, Luxembourg = 125, Macau = 126, Macedonia = 127, Madagascar = 128, Malawi = 129, Malaysia = 130, Maldives = 131, Mali = 132, Malta = 133, MarshallIslands = 134, Martinique = 135, Mauritania = 136, Mauritius = 137, Mayotte = 138, Mexico = 139, Micronesia = 140, Moldova = 141, Monaco = 142, Mongolia = 143, Montserrat = 144, Morocco = 145, Mozambique = 146, Myanmar = 147, Namibia = 148, NauruCountry = 149, Nepal = 150, Netherlands = 151, NetherlandsAntilles = 152, NewCaledonia = 153, NewZealand = 154, Nicaragua = 155, Niger = 156, Nigeria = 157, Niue = 158, NorfolkIsland = 159, NorthernMarianaIslands = 160, Norway = 161, Oman = 162, Pakistan = 163, Palau = 164, PalestinianTerritory = 165, Panama = 166, PapuaNewGuinea = 167, Paraguay = 168, Peru = 169, Philippines = 170, Pitcairn = 171, Poland = 172, Portugal = 173, PuertoRico = 174, Qatar = 175, Reunion = 176, Romania = 177, RussianFederation = 178, Rwanda = 179, SaintKittsAndNevis = 180, StLucia = 181, StVincentAndTheGrenadines = 182, Samoa = 183, SanMarino = 184, SaoTomeAndPrincipe = 185, SaudiArabia = 186, Senegal = 187, Seychelles = 188, SierraLeone = 189, Singapore = 190, Slovakia = 191, Slovenia = 192, SolomonIslands = 193, Somalia = 194, SouthAfrica = 195, SouthGeorgiaAndTheSouthSandwichIslands = 196, Spain = 197, SriLanka = 198, StHelena = 199, StPierreAndMiquelon = 200, Sudan = 201, Suriname = 202, SvalbardAndJanMayenIslands = 203, Swaziland = 204, Sweden = 205, Switzerland = 206, SyrianArabRepublic = 207, Taiwan = 208, Tajikistan = 209, Tanzania = 210, Thailand = 211, Togo = 212, Tokelau = 213, TongaCountry = 214, TrinidadAndTobago = 215, Tunisia = 216, Turkey = 217, Turkmenistan = 218, TurksAndCaicosIslands = 219, Tuvalu = 220, Uganda = 221, Ukraine = 222, UnitedArabEmirates = 223, UnitedKingdom = 224, UnitedStates = 225, UnitedStatesMinorOutlyingIslands = 226, Uruguay = 227, Uzbekistan = 228, Vanuatu = 229, VaticanCityState = 230, Venezuela = 231, VietNam = 232, BritishVirginIslands = 233, USVirginIslands = 234, WallisAndFutunaIslands = 235, WesternSahara = 236, Yemen = 237, Yugoslavia = 238, Zambia = 239, Zimbabwe = 240, LastCountry = Zimbabwe }</li>
|
---|
44 | <li class=fn><a href="#QLocale"><b>QLocale</b></a> ()</li>
|
---|
45 | <li class=fn><a href="#QLocale-2"><b>QLocale</b></a> ( const QString & name )</li>
|
---|
46 | <li class=fn><a href="#QLocale-3"><b>QLocale</b></a> ( Language language, Country country = AnyCountry )</li>
|
---|
47 | <li class=fn><a href="#QLocale-4"><b>QLocale</b></a> ( const QLocale & other )</li>
|
---|
48 | <li class=fn>QLocale & <a href="#operator-eq"><b>operator=</b></a> ( const QLocale & other )</li>
|
---|
49 | <li class=fn>Language <a href="#language"><b>language</b></a> () const</li>
|
---|
50 | <li class=fn>Country <a href="#country"><b>country</b></a> () const</li>
|
---|
51 | <li class=fn>QString <a href="#name"><b>name</b></a> () const</li>
|
---|
52 | <li class=fn>short <a href="#toShort"><b>toShort</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
53 | <li class=fn>ushort <a href="#toUShort"><b>toUShort</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
54 | <li class=fn>int <a href="#toInt"><b>toInt</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
55 | <li class=fn>uint <a href="#toUInt"><b>toUInt</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
56 | <li class=fn>Q_LONG <a href="#toLong"><b>toLong</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
57 | <li class=fn>Q_ULONG <a href="#toULong"><b>toULong</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
58 | <li class=fn>Q_LLONG <a href="#toLongLong"><b>toLongLong</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
59 | <li class=fn>Q_ULLONG <a href="#toULongLong"><b>toULongLong</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
60 | <li class=fn>float <a href="#toFloat"><b>toFloat</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
61 | <li class=fn>double <a href="#toDouble"><b>toDouble</b></a> ( const QString & s, bool * ok = 0 ) const</li>
|
---|
62 | <li class=fn>QString <a href="#toString-2"><b>toString</b></a> ( short i ) const</li>
|
---|
63 | <li class=fn>QString <a href="#toString-3"><b>toString</b></a> ( ushort i ) const</li>
|
---|
64 | <li class=fn>QString <a href="#toString-4"><b>toString</b></a> ( int i ) const</li>
|
---|
65 | <li class=fn>QString <a href="#toString-5"><b>toString</b></a> ( uint i ) const</li>
|
---|
66 | <li class=fn>QString <a href="#toString-6"><b>toString</b></a> ( Q_LONG i ) const</li>
|
---|
67 | <li class=fn>QString <a href="#toString-7"><b>toString</b></a> ( Q_ULONG i ) const</li>
|
---|
68 | <li class=fn>QString <a href="#toString"><b>toString</b></a> ( Q_LLONG i ) const</li>
|
---|
69 | <li class=fn>QString <a href="#toString-8"><b>toString</b></a> ( Q_ULLONG i ) const</li>
|
---|
70 | <li class=fn>QString <a href="#toString-9"><b>toString</b></a> ( float i, char f = 'g', int prec = 6 ) const</li>
|
---|
71 | <li class=fn>QString <a href="#toString-a"><b>toString</b></a> ( double i, char f = 'g', int prec = 6 ) const</li>
|
---|
72 | </ul>
|
---|
73 | <h2>Static Public Members</h2>
|
---|
74 | <ul>
|
---|
75 | <li class=fn>QString <a href="#languageToString"><b>languageToString</b></a> ( Language language )</li>
|
---|
76 | <li class=fn>QString <a href="#countryToString"><b>countryToString</b></a> ( Country country )</li>
|
---|
77 | <li class=fn>void <a href="#setDefault"><b>setDefault</b></a> ( const QLocale & locale )</li>
|
---|
78 | <li class=fn>QLocale <a href="#c"><b>c</b></a> ()</li>
|
---|
79 | <li class=fn>QLocale <a href="#system"><b>system</b></a> ()</li>
|
---|
80 | </ul>
|
---|
81 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
82 |
|
---|
83 |
|
---|
84 | The QLocale class converts between numbers and their
|
---|
85 | string representations in various languages.
|
---|
86 | <p>
|
---|
87 |
|
---|
88 | <p> It is initialized with a country/language pair in its constructor
|
---|
89 | and offers number-to-string and string-to-number conversion
|
---|
90 | functions simmilar to those in <a href="qstring.html">QString</a>.
|
---|
91 | <p> <pre>
|
---|
92 | QLocale egyptian(QLocale::<a href="#Language-enum">Arabic</a>, QLocale::<a href="#Country-enum">Egypt</a>);
|
---|
93 | <a href="qstring.html">QString</a> s1 = egyptian.<a href="#toString">toString</a>(1.571429E+07, 'e');
|
---|
94 | <a href="qstring.html">QString</a> s2 = egyptian.<a href="#toString">toString</a>(10);
|
---|
95 |
|
---|
96 | double d = egyptian.<a href="#toDouble">toDouble</a>(s1);
|
---|
97 | int s2 = egyptian.<a href="#toInt">toInt</a>(s2);
|
---|
98 | </pre>
|
---|
99 |
|
---|
100 | <p> QLocale supports the concept of a default locale, which is
|
---|
101 | determined from the system's locale settings at application
|
---|
102 | startup. The default locale can be changed by calling the
|
---|
103 | static member <a href="#setDefault">setDefault</a>(). The default locale has the
|
---|
104 | following effects:
|
---|
105 | <p> <ul>
|
---|
106 | <li> If a QLocale object is constructed with the default constructor,
|
---|
107 | it will use the default locale's settings.
|
---|
108 | <li> <a href="qstring.html#toDouble">QString::toDouble</a>() interprets the string according to the default
|
---|
109 | locale. If this fails, it falls back on the "C" locale.
|
---|
110 | <li> <a href="qstring.html#arg">QString::arg</a>() uses the default locale to format a number when
|
---|
111 | its position specifier in the format string contains an 'L',
|
---|
112 | e.g. "%L1".
|
---|
113 | </ul>
|
---|
114 | <p> <pre>
|
---|
115 | QLocale::<a href="#setDefault">setDefault</a>(<a href="#QLocale">QLocale</a>(QLocale::<a href="#Language-enum">Hebrew</a>, QLocale::<a href="#Country-enum">Israel</a>));
|
---|
116 | QLocale hebrew; // Constructs a default QLocale
|
---|
117 | <a href="qstring.html">QString</a> s1 = hebrew.<a href="#toString">toString</a>(15714.3, 'e');
|
---|
118 |
|
---|
119 | bool ok;
|
---|
120 | double d;
|
---|
121 |
|
---|
122 | QLocale::<a href="#setDefault">setDefault</a>(QLocale::<a href="#Language-enum">C</a>);
|
---|
123 | d = QString( "1234,56" ).toDouble(&ok); // ok == false
|
---|
124 | d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
|
---|
125 |
|
---|
126 | QLocale::<a href="#setDefault">setDefault</a>(QLocale::<a href="#Language-enum">German</a>);
|
---|
127 | d = QString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
|
---|
128 | d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
|
---|
129 |
|
---|
130 | QLocale::<a href="#setDefault">setDefault</a>(<a href="#QLocale">QLocale</a>(QLocale::<a href="#Language-enum">English</a>, QLocale::<a href="#Country-enum">UnitedStates</a>));
|
---|
131 | str = QString( "%1 %L2 %L3" )
|
---|
132 | .arg( 12345 )
|
---|
133 | .arg( 12345 )
|
---|
134 | .arg( 12345, 0, 16 );
|
---|
135 | // str == "12345 12,345 3039"
|
---|
136 | </pre>
|
---|
137 |
|
---|
138 | <p> When a language/country pair is specified in the constructor, one
|
---|
139 | of three things can happen:
|
---|
140 | <p> <ul>
|
---|
141 | <li> If the language/country pair is found in the database, it is used.
|
---|
142 | <li> If the language is found but the country is not, or if the country
|
---|
143 | is <a href="#Country-enum">AnyCountry</a>, the language is used with the most
|
---|
144 | appropriate available country (for example, Germany for German),
|
---|
145 | <li> If neither the language nor the country are found, QLocale
|
---|
146 | defaults to the default locale (see <a href="#setDefault">setDefault</a>()).
|
---|
147 | </ul>
|
---|
148 | <p> The "C" locale is identical to English/UnitedStates.
|
---|
149 | <p> Use <a href="#language">language</a>() and <a href="#country">country</a>() to determine the actual language and
|
---|
150 | country values used.
|
---|
151 | <p> An alternative method for constructing a QLocale object is by
|
---|
152 | specifying the locale name.
|
---|
153 | <p> <pre>
|
---|
154 | QLocale korean("ko");
|
---|
155 | QLocale swiss("de_CH");
|
---|
156 | </pre>
|
---|
157 |
|
---|
158 | <p> This constructor converts the locale name to a language/country
|
---|
159 | pair; it does not use the system locale database.
|
---|
160 | <p> All the methods in QLocale, with the exception of setDefault(),
|
---|
161 | are reentrant.
|
---|
162 | <p> <p>See also <a href="qstring.html#toDouble">QString::toDouble</a>(), <a href="qstring.html#arg">QString::arg</a>(), and <a href="text.html">Text Related Classes</a>.
|
---|
163 |
|
---|
164 | <p> The double-to-string and string-to-double conversion functions are
|
---|
165 | covered by the following licenses:
|
---|
166 | <p>
|
---|
167 | <p> Copyright (c) 1991 by AT&T.
|
---|
168 | <p> Permission to use, copy, modify, and distribute this software for any
|
---|
169 | purpose without fee is hereby granted, provided that this entire notice
|
---|
170 | is included in all copies of any software which is or includes a copy
|
---|
171 | or modification of this software and in all copies of the supporting
|
---|
172 | documentation for such software.
|
---|
173 | <p> THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
|
---|
174 | WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
|
---|
175 | REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
|
---|
176 | OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
|
---|
177 | <p> This product includes software developed by the University of
|
---|
178 | California, Berkeley and its contributors.
|
---|
179 |
|
---|
180 | <hr><h2>Member Type Documentation</h2>
|
---|
181 | <h3 class=fn><a name="Country-enum"></a>QLocale::Country</h3>
|
---|
182 |
|
---|
183 | <p> This enumerated type is used to specify a country.
|
---|
184 | <ul>
|
---|
185 | <li><tt>QLocale::AnyCountry</tt>
|
---|
186 | <li><tt>QLocale::Afghanistan</tt>
|
---|
187 | <li><tt>QLocale::Albania</tt>
|
---|
188 | <li><tt>QLocale::Algeria</tt>
|
---|
189 | <li><tt>QLocale::AmericanSamoa</tt>
|
---|
190 | <li><tt>QLocale::Andorra</tt>
|
---|
191 | <li><tt>QLocale::Angola</tt>
|
---|
192 | <li><tt>QLocale::Anguilla</tt>
|
---|
193 | <li><tt>QLocale::Antarctica</tt>
|
---|
194 | <li><tt>QLocale::AntiguaAndBarbuda</tt>
|
---|
195 | <li><tt>QLocale::Argentina</tt>
|
---|
196 | <li><tt>QLocale::Armenia</tt>
|
---|
197 | <li><tt>QLocale::Aruba</tt>
|
---|
198 | <li><tt>QLocale::Australia</tt>
|
---|
199 | <li><tt>QLocale::Austria</tt>
|
---|
200 | <li><tt>QLocale::Azerbaijan</tt>
|
---|
201 | <li><tt>QLocale::Bahamas</tt>
|
---|
202 | <li><tt>QLocale::Bahrain</tt>
|
---|
203 | <li><tt>QLocale::Bangladesh</tt>
|
---|
204 | <li><tt>QLocale::Barbados</tt>
|
---|
205 | <li><tt>QLocale::Belarus</tt>
|
---|
206 | <li><tt>QLocale::Belgium</tt>
|
---|
207 | <li><tt>QLocale::Belize</tt>
|
---|
208 | <li><tt>QLocale::Benin</tt>
|
---|
209 | <li><tt>QLocale::Bermuda</tt>
|
---|
210 | <li><tt>QLocale::Bhutan</tt>
|
---|
211 | <li><tt>QLocale::Bolivia</tt>
|
---|
212 | <li><tt>QLocale::BosniaAndHerzegowina</tt>
|
---|
213 | <li><tt>QLocale::Botswana</tt>
|
---|
214 | <li><tt>QLocale::BouvetIsland</tt>
|
---|
215 | <li><tt>QLocale::Brazil</tt>
|
---|
216 | <li><tt>QLocale::BritishIndianOceanTerritory</tt>
|
---|
217 | <li><tt>QLocale::BruneiDarussalam</tt>
|
---|
218 | <li><tt>QLocale::Bulgaria</tt>
|
---|
219 | <li><tt>QLocale::BurkinaFaso</tt>
|
---|
220 | <li><tt>QLocale::Burundi</tt>
|
---|
221 | <li><tt>QLocale::Cambodia</tt>
|
---|
222 | <li><tt>QLocale::Cameroon</tt>
|
---|
223 | <li><tt>QLocale::Canada</tt>
|
---|
224 | <li><tt>QLocale::CapeVerde</tt>
|
---|
225 | <li><tt>QLocale::CaymanIslands</tt>
|
---|
226 | <li><tt>QLocale::CentralAfricanRepublic</tt>
|
---|
227 | <li><tt>QLocale::Chad</tt>
|
---|
228 | <li><tt>QLocale::Chile</tt>
|
---|
229 | <li><tt>QLocale::China</tt>
|
---|
230 | <li><tt>QLocale::ChristmasIsland</tt>
|
---|
231 | <li><tt>QLocale::CocosIslands</tt>
|
---|
232 | <li><tt>QLocale::Colombia</tt>
|
---|
233 | <li><tt>QLocale::Comoros</tt>
|
---|
234 | <li><tt>QLocale::DemocraticRepublicOfCongo</tt>
|
---|
235 | <li><tt>QLocale::PeoplesRepublicOfCongo</tt>
|
---|
236 | <li><tt>QLocale::CookIslands</tt>
|
---|
237 | <li><tt>QLocale::CostaRica</tt>
|
---|
238 | <li><tt>QLocale::IvoryCoast</tt>
|
---|
239 | <li><tt>QLocale::Croatia</tt>
|
---|
240 | <li><tt>QLocale::Cuba</tt>
|
---|
241 | <li><tt>QLocale::Cyprus</tt>
|
---|
242 | <li><tt>QLocale::CzechRepublic</tt>
|
---|
243 | <li><tt>QLocale::Denmark</tt>
|
---|
244 | <li><tt>QLocale::Djibouti</tt>
|
---|
245 | <li><tt>QLocale::Dominica</tt>
|
---|
246 | <li><tt>QLocale::DominicanRepublic</tt>
|
---|
247 | <li><tt>QLocale::EastTimor</tt>
|
---|
248 | <li><tt>QLocale::Ecuador</tt>
|
---|
249 | <li><tt>QLocale::Egypt</tt>
|
---|
250 | <li><tt>QLocale::ElSalvador</tt>
|
---|
251 | <li><tt>QLocale::EquatorialGuinea</tt>
|
---|
252 | <li><tt>QLocale::Eritrea</tt>
|
---|
253 | <li><tt>QLocale::Estonia</tt>
|
---|
254 | <li><tt>QLocale::Ethiopia</tt>
|
---|
255 | <li><tt>QLocale::FalklandIslands</tt>
|
---|
256 | <li><tt>QLocale::FaroeIslands</tt>
|
---|
257 | <li><tt>QLocale::FijiCountry</tt>
|
---|
258 | <li><tt>QLocale::Finland</tt>
|
---|
259 | <li><tt>QLocale::France</tt>
|
---|
260 | <li><tt>QLocale::MetropolitanFrance</tt>
|
---|
261 | <li><tt>QLocale::FrenchGuiana</tt>
|
---|
262 | <li><tt>QLocale::FrenchPolynesia</tt>
|
---|
263 | <li><tt>QLocale::FrenchSouthernTerritories</tt>
|
---|
264 | <li><tt>QLocale::Gabon</tt>
|
---|
265 | <li><tt>QLocale::Gambia</tt>
|
---|
266 | <li><tt>QLocale::Georgia</tt>
|
---|
267 | <li><tt>QLocale::Germany</tt>
|
---|
268 | <li><tt>QLocale::Ghana</tt>
|
---|
269 | <li><tt>QLocale::Gibraltar</tt>
|
---|
270 | <li><tt>QLocale::Greece</tt>
|
---|
271 | <li><tt>QLocale::Greenland</tt>
|
---|
272 | <li><tt>QLocale::Grenada</tt>
|
---|
273 | <li><tt>QLocale::Guadeloupe</tt>
|
---|
274 | <li><tt>QLocale::Guam</tt>
|
---|
275 | <li><tt>QLocale::Guatemala</tt>
|
---|
276 | <li><tt>QLocale::Guinea</tt>
|
---|
277 | <li><tt>QLocale::GuineaBissau</tt>
|
---|
278 | <li><tt>QLocale::Guyana</tt>
|
---|
279 | <li><tt>QLocale::Haiti</tt>
|
---|
280 | <li><tt>QLocale::HeardAndMcDonaldIslands</tt>
|
---|
281 | <li><tt>QLocale::Honduras</tt>
|
---|
282 | <li><tt>QLocale::HongKong</tt>
|
---|
283 | <li><tt>QLocale::Hungary</tt>
|
---|
284 | <li><tt>QLocale::Iceland</tt>
|
---|
285 | <li><tt>QLocale::India</tt>
|
---|
286 | <li><tt>QLocale::Indonesia</tt>
|
---|
287 | <li><tt>QLocale::Iran</tt>
|
---|
288 | <li><tt>QLocale::Iraq</tt>
|
---|
289 | <li><tt>QLocale::Ireland</tt>
|
---|
290 | <li><tt>QLocale::Israel</tt>
|
---|
291 | <li><tt>QLocale::Italy</tt>
|
---|
292 | <li><tt>QLocale::Jamaica</tt>
|
---|
293 | <li><tt>QLocale::Japan</tt>
|
---|
294 | <li><tt>QLocale::Jordan</tt>
|
---|
295 | <li><tt>QLocale::Kazakhstan</tt>
|
---|
296 | <li><tt>QLocale::Kenya</tt>
|
---|
297 | <li><tt>QLocale::Kiribati</tt>
|
---|
298 | <li><tt>QLocale::DemocraticRepublicOfKorea</tt>
|
---|
299 | <li><tt>QLocale::RepublicOfKorea</tt>
|
---|
300 | <li><tt>QLocale::Kuwait</tt>
|
---|
301 | <li><tt>QLocale::Kyrgyzstan</tt>
|
---|
302 | <li><tt>QLocale::Lao</tt>
|
---|
303 | <li><tt>QLocale::Latvia</tt>
|
---|
304 | <li><tt>QLocale::Lebanon</tt>
|
---|
305 | <li><tt>QLocale::Lesotho</tt>
|
---|
306 | <li><tt>QLocale::Liberia</tt>
|
---|
307 | <li><tt>QLocale::LibyanArabJamahiriya</tt>
|
---|
308 | <li><tt>QLocale::Liechtenstein</tt>
|
---|
309 | <li><tt>QLocale::Lithuania</tt>
|
---|
310 | <li><tt>QLocale::Luxembourg</tt>
|
---|
311 | <li><tt>QLocale::Macau</tt>
|
---|
312 | <li><tt>QLocale::Macedonia</tt>
|
---|
313 | <li><tt>QLocale::Madagascar</tt>
|
---|
314 | <li><tt>QLocale::Malawi</tt>
|
---|
315 | <li><tt>QLocale::Malaysia</tt>
|
---|
316 | <li><tt>QLocale::Maldives</tt>
|
---|
317 | <li><tt>QLocale::Mali</tt>
|
---|
318 | <li><tt>QLocale::Malta</tt>
|
---|
319 | <li><tt>QLocale::MarshallIslands</tt>
|
---|
320 | <li><tt>QLocale::Martinique</tt>
|
---|
321 | <li><tt>QLocale::Mauritania</tt>
|
---|
322 | <li><tt>QLocale::Mauritius</tt>
|
---|
323 | <li><tt>QLocale::Mayotte</tt>
|
---|
324 | <li><tt>QLocale::Mexico</tt>
|
---|
325 | <li><tt>QLocale::Micronesia</tt>
|
---|
326 | <li><tt>QLocale::Moldova</tt>
|
---|
327 | <li><tt>QLocale::Monaco</tt>
|
---|
328 | <li><tt>QLocale::Mongolia</tt>
|
---|
329 | <li><tt>QLocale::Montserrat</tt>
|
---|
330 | <li><tt>QLocale::Morocco</tt>
|
---|
331 | <li><tt>QLocale::Mozambique</tt>
|
---|
332 | <li><tt>QLocale::Myanmar</tt>
|
---|
333 | <li><tt>QLocale::Namibia</tt>
|
---|
334 | <li><tt>QLocale::NauruCountry</tt>
|
---|
335 | <li><tt>QLocale::Nepal</tt>
|
---|
336 | <li><tt>QLocale::Netherlands</tt>
|
---|
337 | <li><tt>QLocale::NetherlandsAntilles</tt>
|
---|
338 | <li><tt>QLocale::NewCaledonia</tt>
|
---|
339 | <li><tt>QLocale::NewZealand</tt>
|
---|
340 | <li><tt>QLocale::Nicaragua</tt>
|
---|
341 | <li><tt>QLocale::Niger</tt>
|
---|
342 | <li><tt>QLocale::Nigeria</tt>
|
---|
343 | <li><tt>QLocale::Niue</tt>
|
---|
344 | <li><tt>QLocale::NorfolkIsland</tt>
|
---|
345 | <li><tt>QLocale::NorthernMarianaIslands</tt>
|
---|
346 | <li><tt>QLocale::Norway</tt>
|
---|
347 | <li><tt>QLocale::Oman</tt>
|
---|
348 | <li><tt>QLocale::Pakistan</tt>
|
---|
349 | <li><tt>QLocale::Palau</tt>
|
---|
350 | <li><tt>QLocale::PalestinianTerritory</tt>
|
---|
351 | <li><tt>QLocale::Panama</tt>
|
---|
352 | <li><tt>QLocale::PapuaNewGuinea</tt>
|
---|
353 | <li><tt>QLocale::Paraguay</tt>
|
---|
354 | <li><tt>QLocale::Peru</tt>
|
---|
355 | <li><tt>QLocale::Philippines</tt>
|
---|
356 | <li><tt>QLocale::Pitcairn</tt>
|
---|
357 | <li><tt>QLocale::Poland</tt>
|
---|
358 | <li><tt>QLocale::Portugal</tt>
|
---|
359 | <li><tt>QLocale::PuertoRico</tt>
|
---|
360 | <li><tt>QLocale::Qatar</tt>
|
---|
361 | <li><tt>QLocale::Reunion</tt>
|
---|
362 | <li><tt>QLocale::Romania</tt>
|
---|
363 | <li><tt>QLocale::RussianFederation</tt>
|
---|
364 | <li><tt>QLocale::Rwanda</tt>
|
---|
365 | <li><tt>QLocale::SaintKittsAndNevis</tt>
|
---|
366 | <li><tt>QLocale::StLucia</tt>
|
---|
367 | <li><tt>QLocale::StVincentAndTheGrenadines</tt>
|
---|
368 | <li><tt>QLocale::Samoa</tt>
|
---|
369 | <li><tt>QLocale::SanMarino</tt>
|
---|
370 | <li><tt>QLocale::SaoTomeAndPrincipe</tt>
|
---|
371 | <li><tt>QLocale::SaudiArabia</tt>
|
---|
372 | <li><tt>QLocale::Senegal</tt>
|
---|
373 | <li><tt>QLocale::Seychelles</tt>
|
---|
374 | <li><tt>QLocale::SierraLeone</tt>
|
---|
375 | <li><tt>QLocale::Singapore</tt>
|
---|
376 | <li><tt>QLocale::Slovakia</tt>
|
---|
377 | <li><tt>QLocale::Slovenia</tt>
|
---|
378 | <li><tt>QLocale::SolomonIslands</tt>
|
---|
379 | <li><tt>QLocale::Somalia</tt>
|
---|
380 | <li><tt>QLocale::SouthAfrica</tt>
|
---|
381 | <li><tt>QLocale::SouthGeorgiaAndTheSouthSandwichIslands</tt>
|
---|
382 | <li><tt>QLocale::Spain</tt>
|
---|
383 | <li><tt>QLocale::SriLanka</tt>
|
---|
384 | <li><tt>QLocale::StHelena</tt>
|
---|
385 | <li><tt>QLocale::StPierreAndMiquelon</tt>
|
---|
386 | <li><tt>QLocale::Sudan</tt>
|
---|
387 | <li><tt>QLocale::Suriname</tt>
|
---|
388 | <li><tt>QLocale::SvalbardAndJanMayenIslands</tt>
|
---|
389 | <li><tt>QLocale::Swaziland</tt>
|
---|
390 | <li><tt>QLocale::Sweden</tt>
|
---|
391 | <li><tt>QLocale::Switzerland</tt>
|
---|
392 | <li><tt>QLocale::SyrianArabRepublic</tt>
|
---|
393 | <li><tt>QLocale::Taiwan</tt>
|
---|
394 | <li><tt>QLocale::Tajikistan</tt>
|
---|
395 | <li><tt>QLocale::Tanzania</tt>
|
---|
396 | <li><tt>QLocale::Thailand</tt>
|
---|
397 | <li><tt>QLocale::Togo</tt>
|
---|
398 | <li><tt>QLocale::Tokelau</tt>
|
---|
399 | <li><tt>QLocale::TongaCountry</tt>
|
---|
400 | <li><tt>QLocale::TrinidadAndTobago</tt>
|
---|
401 | <li><tt>QLocale::Tunisia</tt>
|
---|
402 | <li><tt>QLocale::Turkey</tt>
|
---|
403 | <li><tt>QLocale::Turkmenistan</tt>
|
---|
404 | <li><tt>QLocale::TurksAndCaicosIslands</tt>
|
---|
405 | <li><tt>QLocale::Tuvalu</tt>
|
---|
406 | <li><tt>QLocale::Uganda</tt>
|
---|
407 | <li><tt>QLocale::Ukraine</tt>
|
---|
408 | <li><tt>QLocale::UnitedArabEmirates</tt>
|
---|
409 | <li><tt>QLocale::UnitedKingdom</tt>
|
---|
410 | <li><tt>QLocale::UnitedStates</tt>
|
---|
411 | <li><tt>QLocale::UnitedStatesMinorOutlyingIslands</tt>
|
---|
412 | <li><tt>QLocale::Uruguay</tt>
|
---|
413 | <li><tt>QLocale::Uzbekistan</tt>
|
---|
414 | <li><tt>QLocale::Vanuatu</tt>
|
---|
415 | <li><tt>QLocale::VaticanCityState</tt>
|
---|
416 | <li><tt>QLocale::Venezuela</tt>
|
---|
417 | <li><tt>QLocale::VietNam</tt>
|
---|
418 | <li><tt>QLocale::BritishVirginIslands</tt>
|
---|
419 | <li><tt>QLocale::USVirginIslands</tt>
|
---|
420 | <li><tt>QLocale::WallisAndFutunaIslands</tt>
|
---|
421 | <li><tt>QLocale::WesternSahara</tt>
|
---|
422 | <li><tt>QLocale::Yemen</tt>
|
---|
423 | <li><tt>QLocale::Yugoslavia</tt>
|
---|
424 | <li><tt>QLocale::Zambia</tt>
|
---|
425 | <li><tt>QLocale::Zimbabwe</tt>
|
---|
426 | </ul>
|
---|
427 | <h3 class=fn><a name="Language-enum"></a>QLocale::Language</h3>
|
---|
428 |
|
---|
429 | <p> This enumerated type is used to specify a language.
|
---|
430 | <ul>
|
---|
431 | <li><tt>QLocale::C</tt> - Identical to English/UnitedStates
|
---|
432 | <li><tt>QLocale::Abkhazian</tt>
|
---|
433 | <li><tt>QLocale::Afan</tt>
|
---|
434 | <li><tt>QLocale::Afar</tt>
|
---|
435 | <li><tt>QLocale::Afrikaans</tt>
|
---|
436 | <li><tt>QLocale::Albanian</tt>
|
---|
437 | <li><tt>QLocale::Amharic</tt>
|
---|
438 | <li><tt>QLocale::Arabic</tt>
|
---|
439 | <li><tt>QLocale::Armenian</tt>
|
---|
440 | <li><tt>QLocale::Assamese</tt>
|
---|
441 | <li><tt>QLocale::Aymara</tt>
|
---|
442 | <li><tt>QLocale::Azerbaijani</tt>
|
---|
443 | <li><tt>QLocale::Bashkir</tt>
|
---|
444 | <li><tt>QLocale::Basque</tt>
|
---|
445 | <li><tt>QLocale::Bengali</tt>
|
---|
446 | <li><tt>QLocale::Bhutani</tt>
|
---|
447 | <li><tt>QLocale::Bihari</tt>
|
---|
448 | <li><tt>QLocale::Bislama</tt>
|
---|
449 | <li><tt>QLocale::Breton</tt>
|
---|
450 | <li><tt>QLocale::Bulgarian</tt>
|
---|
451 | <li><tt>QLocale::Burmese</tt>
|
---|
452 | <li><tt>QLocale::Byelorussian</tt>
|
---|
453 | <li><tt>QLocale::Cambodian</tt>
|
---|
454 | <li><tt>QLocale::Catalan</tt>
|
---|
455 | <li><tt>QLocale::Chinese</tt>
|
---|
456 | <li><tt>QLocale::Corsican</tt>
|
---|
457 | <li><tt>QLocale::Croatian</tt>
|
---|
458 | <li><tt>QLocale::Czech</tt>
|
---|
459 | <li><tt>QLocale::Danish</tt>
|
---|
460 | <li><tt>QLocale::Dutch</tt>
|
---|
461 | <li><tt>QLocale::English</tt>
|
---|
462 | <li><tt>QLocale::Esperanto</tt>
|
---|
463 | <li><tt>QLocale::Estonian</tt>
|
---|
464 | <li><tt>QLocale::Faroese</tt>
|
---|
465 | <li><tt>QLocale::FijiLanguage</tt>
|
---|
466 | <li><tt>QLocale::Finnish</tt>
|
---|
467 | <li><tt>QLocale::French</tt>
|
---|
468 | <li><tt>QLocale::Frisian</tt>
|
---|
469 | <li><tt>QLocale::Gaelic</tt>
|
---|
470 | <li><tt>QLocale::Galician</tt>
|
---|
471 | <li><tt>QLocale::Georgian</tt>
|
---|
472 | <li><tt>QLocale::German</tt>
|
---|
473 | <li><tt>QLocale::Greek</tt>
|
---|
474 | <li><tt>QLocale::Greenlandic</tt>
|
---|
475 | <li><tt>QLocale::Guarani</tt>
|
---|
476 | <li><tt>QLocale::Gujarati</tt>
|
---|
477 | <li><tt>QLocale::Hausa</tt>
|
---|
478 | <li><tt>QLocale::Hebrew</tt>
|
---|
479 | <li><tt>QLocale::Hindi</tt>
|
---|
480 | <li><tt>QLocale::Hungarian</tt>
|
---|
481 | <li><tt>QLocale::Icelandic</tt>
|
---|
482 | <li><tt>QLocale::Indonesian</tt>
|
---|
483 | <li><tt>QLocale::Interlingua</tt>
|
---|
484 | <li><tt>QLocale::Interlingue</tt>
|
---|
485 | <li><tt>QLocale::Inuktitut</tt>
|
---|
486 | <li><tt>QLocale::Inupiak</tt>
|
---|
487 | <li><tt>QLocale::Irish</tt>
|
---|
488 | <li><tt>QLocale::Italian</tt>
|
---|
489 | <li><tt>QLocale::Japanese</tt>
|
---|
490 | <li><tt>QLocale::Javanese</tt>
|
---|
491 | <li><tt>QLocale::Kannada</tt>
|
---|
492 | <li><tt>QLocale::Kashmiri</tt>
|
---|
493 | <li><tt>QLocale::Kazakh</tt>
|
---|
494 | <li><tt>QLocale::Kinyarwanda</tt>
|
---|
495 | <li><tt>QLocale::Kirghiz</tt>
|
---|
496 | <li><tt>QLocale::Korean</tt>
|
---|
497 | <li><tt>QLocale::Kurdish</tt>
|
---|
498 | <li><tt>QLocale::Kurundi</tt>
|
---|
499 | <li><tt>QLocale::Laothian</tt>
|
---|
500 | <li><tt>QLocale::Latin</tt>
|
---|
501 | <li><tt>QLocale::Latvian</tt>
|
---|
502 | <li><tt>QLocale::Lingala</tt>
|
---|
503 | <li><tt>QLocale::Lithuanian</tt>
|
---|
504 | <li><tt>QLocale::Macedonian</tt>
|
---|
505 | <li><tt>QLocale::Malagasy</tt>
|
---|
506 | <li><tt>QLocale::Malay</tt>
|
---|
507 | <li><tt>QLocale::Malayalam</tt>
|
---|
508 | <li><tt>QLocale::Maltese</tt>
|
---|
509 | <li><tt>QLocale::Maori</tt>
|
---|
510 | <li><tt>QLocale::Marathi</tt>
|
---|
511 | <li><tt>QLocale::Moldavian</tt>
|
---|
512 | <li><tt>QLocale::Mongolian</tt>
|
---|
513 | <li><tt>QLocale::NauruLanguage</tt>
|
---|
514 | <li><tt>QLocale::Nepali</tt>
|
---|
515 | <li><tt>QLocale::Norwegian</tt>
|
---|
516 | <li><tt>QLocale::Occitan</tt>
|
---|
517 | <li><tt>QLocale::Oriya</tt>
|
---|
518 | <li><tt>QLocale::Pashto</tt>
|
---|
519 | <li><tt>QLocale::Persian</tt>
|
---|
520 | <li><tt>QLocale::Polish</tt>
|
---|
521 | <li><tt>QLocale::Portuguese</tt>
|
---|
522 | <li><tt>QLocale::Punjabi</tt>
|
---|
523 | <li><tt>QLocale::Quechua</tt>
|
---|
524 | <li><tt>QLocale::RhaetoRomance</tt>
|
---|
525 | <li><tt>QLocale::Romanian</tt>
|
---|
526 | <li><tt>QLocale::Russian</tt>
|
---|
527 | <li><tt>QLocale::Samoan</tt>
|
---|
528 | <li><tt>QLocale::Sangho</tt>
|
---|
529 | <li><tt>QLocale::Sanskrit</tt>
|
---|
530 | <li><tt>QLocale::Serbian</tt>
|
---|
531 | <li><tt>QLocale::SerboCroatian</tt>
|
---|
532 | <li><tt>QLocale::Sesotho</tt>
|
---|
533 | <li><tt>QLocale::Setswana</tt>
|
---|
534 | <li><tt>QLocale::Shona</tt>
|
---|
535 | <li><tt>QLocale::Sindhi</tt>
|
---|
536 | <li><tt>QLocale::Singhalese</tt>
|
---|
537 | <li><tt>QLocale::Siswati</tt>
|
---|
538 | <li><tt>QLocale::Slovak</tt>
|
---|
539 | <li><tt>QLocale::Slovenian</tt>
|
---|
540 | <li><tt>QLocale::Somali</tt>
|
---|
541 | <li><tt>QLocale::Spanish</tt>
|
---|
542 | <li><tt>QLocale::Sundanese</tt>
|
---|
543 | <li><tt>QLocale::Swahili</tt>
|
---|
544 | <li><tt>QLocale::Swedish</tt>
|
---|
545 | <li><tt>QLocale::Tagalog</tt>
|
---|
546 | <li><tt>QLocale::Tajik</tt>
|
---|
547 | <li><tt>QLocale::Tamil</tt>
|
---|
548 | <li><tt>QLocale::Tatar</tt>
|
---|
549 | <li><tt>QLocale::Telugu</tt>
|
---|
550 | <li><tt>QLocale::Thai</tt>
|
---|
551 | <li><tt>QLocale::Tibetan</tt>
|
---|
552 | <li><tt>QLocale::Tigrinya</tt>
|
---|
553 | <li><tt>QLocale::TongaLanguage</tt>
|
---|
554 | <li><tt>QLocale::Tsonga</tt>
|
---|
555 | <li><tt>QLocale::Turkish</tt>
|
---|
556 | <li><tt>QLocale::Turkmen</tt>
|
---|
557 | <li><tt>QLocale::Twi</tt>
|
---|
558 | <li><tt>QLocale::Uigur</tt>
|
---|
559 | <li><tt>QLocale::Ukrainian</tt>
|
---|
560 | <li><tt>QLocale::Urdu</tt>
|
---|
561 | <li><tt>QLocale::Uzbek</tt>
|
---|
562 | <li><tt>QLocale::Vietnamese</tt>
|
---|
563 | <li><tt>QLocale::Volapuk</tt>
|
---|
564 | <li><tt>QLocale::Welsh</tt>
|
---|
565 | <li><tt>QLocale::Wolof</tt>
|
---|
566 | <li><tt>QLocale::Xhosa</tt>
|
---|
567 | <li><tt>QLocale::Yiddish</tt>
|
---|
568 | <li><tt>QLocale::Yoruba</tt>
|
---|
569 | <li><tt>QLocale::Zhuang</tt>
|
---|
570 | <li><tt>QLocale::Zulu</tt>
|
---|
571 | </ul>
|
---|
572 | <hr><h2>Member Function Documentation</h2>
|
---|
573 | <h3 class=fn><a name="QLocale"></a>QLocale::QLocale ()
|
---|
574 | </h3>
|
---|
575 | Constructs a QLocale object initialized with the default locale.
|
---|
576 | <p> <p>See also <a href="#setDefault">setDefault</a>().
|
---|
577 |
|
---|
578 | <h3 class=fn><a name="QLocale-2"></a>QLocale::QLocale ( const <a href="qstring.html">QString</a> & name )
|
---|
579 | </h3>
|
---|
580 | Constructs a QLocale object with the specified <em>name</em>,
|
---|
581 | which has the format
|
---|
582 | "language[_country][.codeset][@modifier]" or "C", where:
|
---|
583 | <p> <ul>
|
---|
584 | <li> language is a lowercase, two-letter, ISO 639 language code,
|
---|
585 | <li> territory is an uppercase, two-letter, ISO 3166 country code,
|
---|
586 | <li> and codeset and modifier are ignored.
|
---|
587 | </ul>
|
---|
588 | <p> If the string violates the locale format, or language is not
|
---|
589 | a valid ISO 369 code, the "C" locale is used instead. If country
|
---|
590 | is not present, or is not a valid ISO 3166 code, the most
|
---|
591 | appropriate country is chosen for the specified language.
|
---|
592 | <p> The language and country codes are converted to their respective
|
---|
593 | <a href="#Language-enum">Language</a> and <a href="#Country-enum">Country</a> enums. After this conversion is
|
---|
594 | performed the constructor behaves exactly like QLocale(Country,
|
---|
595 | Language).
|
---|
596 | <p> This constructor is much slower than QLocale(Country, Language).
|
---|
597 | <p> <p>See also <a href="#name">name</a>().
|
---|
598 |
|
---|
599 | <h3 class=fn><a name="QLocale-3"></a>QLocale::QLocale ( <a href="qlocale.html#Language-enum">Language</a> language, <a href="qlocale.html#Country-enum">Country</a> country = AnyCountry )
|
---|
600 | </h3>
|
---|
601 | Constructs a QLocale object with the specified <em>language</em> and <em>country</em>.
|
---|
602 | <p> <ul>
|
---|
603 | <li> If the language/country pair is found in the database, it is used.
|
---|
604 | <li> If the language is found but the country is not, or if the country
|
---|
605 | is <a href="#Country-enum">AnyCountry</a>, the language is used with the most
|
---|
606 | appropriate available country (for example, Germany for German),
|
---|
607 | <li> If neither the language nor the country are found, QLocale
|
---|
608 | defaults to the default locale (see <a href="#setDefault">setDefault</a>()).
|
---|
609 | </ul>
|
---|
610 | <p> The language and country that are actually used can be queried
|
---|
611 | using <a href="#language">language</a>() and <a href="#country">country</a>().
|
---|
612 | <p> <p>See also <a href="#setDefault">setDefault</a>(), <a href="#language">language</a>(), and <a href="#country">country</a>().
|
---|
613 |
|
---|
614 | <h3 class=fn><a name="QLocale-4"></a>QLocale::QLocale ( const <a href="qlocale.html">QLocale</a> & other )
|
---|
615 | </h3>
|
---|
616 | Constructs a QLocale object as a copy of <em>other</em>.
|
---|
617 |
|
---|
618 | <h3 class=fn><a href="qlocale.html">QLocale</a> <a name="c"></a>QLocale::c ()<tt> [static]</tt>
|
---|
619 | </h3>
|
---|
620 |
|
---|
621 | <p> Returns a QLocale object initialized to the "C" locale.
|
---|
622 | <p> <p>See also <a href="#system">system</a>().
|
---|
623 |
|
---|
624 | <h3 class=fn><a href="qlocale.html#Country-enum">Country</a> <a name="country"></a>QLocale::country () const
|
---|
625 | </h3>
|
---|
626 | Returns the country of this locale.
|
---|
627 | <p> <p>See also <a href="#QLocale">QLocale</a>().
|
---|
628 |
|
---|
629 | <h3 class=fn><a href="qstring.html">QString</a> <a name="countryToString"></a>QLocale::countryToString ( <a href="qlocale.html#Country-enum">Country</a> country )<tt> [static]</tt>
|
---|
630 | </h3>
|
---|
631 | Returns a <a href="qstring.html">QString</a> containing the name of <em>country</em>.
|
---|
632 |
|
---|
633 | <h3 class=fn><a href="qlocale.html#Language-enum">Language</a> <a name="language"></a>QLocale::language () const
|
---|
634 | </h3>
|
---|
635 | Returns the language of this locale.
|
---|
636 | <p> <p>See also <a href="#QLocale">QLocale</a>().
|
---|
637 |
|
---|
638 | <h3 class=fn><a href="qstring.html">QString</a> <a name="languageToString"></a>QLocale::languageToString ( <a href="qlocale.html#Language-enum">Language</a> language )<tt> [static]</tt>
|
---|
639 | </h3>
|
---|
640 | Returns a <a href="qstring.html">QString</a> containing the name of <em>language</em>.
|
---|
641 |
|
---|
642 | <h3 class=fn><a href="qstring.html">QString</a> <a name="name"></a>QLocale::name () const
|
---|
643 | </h3>
|
---|
644 | Returns the language and country of this locale as a
|
---|
645 | string of the form "language_country", where
|
---|
646 | language is a lowercase, two-letter ISO 639 language code,
|
---|
647 | and country is an uppercase, two-letter ISO 3166 country code.
|
---|
648 | <p> <p>See also <a href="#QLocale">QLocale</a>().
|
---|
649 |
|
---|
650 | <h3 class=fn><a href="qlocale.html">QLocale</a> & <a name="operator-eq"></a>QLocale::operator= ( const <a href="qlocale.html">QLocale</a> & other )
|
---|
651 | </h3>
|
---|
652 | Assigns <em>other</em> to this QLocale object and returns a reference
|
---|
653 | to this QLocale object.
|
---|
654 |
|
---|
655 | <h3 class=fn>void <a name="setDefault"></a>QLocale::setDefault ( const <a href="qlocale.html">QLocale</a> & locale )<tt> [static]</tt>
|
---|
656 | </h3><p><b>Warning:</b> This function is <i>not</i> <a href="threads.html#reentrant">reentrant</a>.</p>
|
---|
657 |
|
---|
658 |
|
---|
659 | <p> Sets the global default locale to <em>locale</em>. These
|
---|
660 | values are used when a QLocale object is constructed with
|
---|
661 | no arguments. If this function is not called, the system's
|
---|
662 | locale is used.
|
---|
663 | <p> <b>Warning:</b> In a multithreaded application, the default locale
|
---|
664 | should be set at application startup, before any non-GUI threads
|
---|
665 | are created.
|
---|
666 | <p> <p>See also <a href="#system">system</a>() and <a href="#c">c</a>().
|
---|
667 |
|
---|
668 | <h3 class=fn><a href="qlocale.html">QLocale</a> <a name="system"></a>QLocale::system ()<tt> [static]</tt>
|
---|
669 | </h3>
|
---|
670 | Returns a QLocale object initialized to the system locale.
|
---|
671 |
|
---|
672 | <h3 class=fn>double <a name="toDouble"></a>QLocale::toDouble ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
673 | </h3>
|
---|
674 | Returns the double represented by the localized string <em>s</em>, or
|
---|
675 | 0.0 if the conversion failed.
|
---|
676 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
677 | *ok to false and success by setting *ok to true.
|
---|
678 | <p> Unlike <a href="qstring.html#toDouble">QString::toDouble</a>(), this function does not fall back to
|
---|
679 | the "C" locale if the string cannot be interpreted in this
|
---|
680 | locale.
|
---|
681 | <p> <pre>
|
---|
682 | bool ok;
|
---|
683 | double d;
|
---|
684 |
|
---|
685 | QLocale c(QLocale::<a href="#Language-enum">C</a>);
|
---|
686 | d = c.<a href="#toDouble">toDouble</a>( "1234.56", &ok ); // ok == true, d == 1234.56
|
---|
687 | d = c.<a href="#toDouble">toDouble</a>( "1,234.56", &ok ); // ok == true, d == 1234.56
|
---|
688 | d = c.<a href="#toDouble">toDouble</a>( "1234,56", &ok ); // ok == false
|
---|
689 |
|
---|
690 | QLocale german(QLocale::<a href="#Language-enum">German</a>);
|
---|
691 | d = german.<a href="#toDouble">toDouble</a>( "1234,56", &ok ); // ok == true, d == 1234.56
|
---|
692 | d = german.<a href="#toDouble">toDouble</a>( "1.234,56", &ok ); // ok == true, d == 1234.56
|
---|
693 | d = german.<a href="#toDouble">toDouble</a>( "1234.56", &ok ); // ok == false
|
---|
694 |
|
---|
695 | d = german.<a href="#toDouble">toDouble</a>( "1.234", &ok ); // ok == true, d == 1234.0
|
---|
696 | </pre>
|
---|
697 |
|
---|
698 | <p> Notice that the last conversion returns 1234.0, because '.' is the
|
---|
699 | thousands group separator in the German locale.
|
---|
700 | <p> This function ignores leading and trailing whitespace.
|
---|
701 | <p> <p>See also <a href="#toString">toString</a>() and <a href="qstring.html#toDouble">QString::toDouble</a>().
|
---|
702 |
|
---|
703 | <h3 class=fn>float <a name="toFloat"></a>QLocale::toFloat ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
704 | </h3>
|
---|
705 | Returns the float represented by the localized string <em>s</em>, or 0.0
|
---|
706 | if the conversion failed.
|
---|
707 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
708 | *ok to false and success by setting *ok to true.
|
---|
709 | <p> This function ignores leading and trailing whitespace.
|
---|
710 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
711 |
|
---|
712 | <h3 class=fn>int <a name="toInt"></a>QLocale::toInt ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
713 | </h3>
|
---|
714 | Returns the int represented by the localized string <em>s</em>, or 0 if
|
---|
715 | the conversion failed.
|
---|
716 | <p> If <em>ok</em> is not 0, reports failure by setting *ok to false and
|
---|
717 | success by setting *ok to true.
|
---|
718 | <p> This function ignores leading and trailing whitespace.
|
---|
719 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
720 |
|
---|
721 | <h3 class=fn>Q_LONG <a name="toLong"></a>QLocale::toLong ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
722 | </h3>
|
---|
723 | Returns the long int represented by the localized string <em>s</em>, or
|
---|
724 | 0 if the conversion failed.
|
---|
725 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
726 | *ok to false and success by setting *ok to true.
|
---|
727 | <p> This function ignores leading and trailing whitespace.
|
---|
728 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
729 |
|
---|
730 | <h3 class=fn>Q_LLONG <a name="toLongLong"></a>QLocale::toLongLong ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
731 | </h3>
|
---|
732 | Returns the long long int represented by the localized string <em>s</em>, or 0 if the conversion failed.
|
---|
733 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
734 | *ok to false and success by setting *ok to true.
|
---|
735 | <p> This function ignores leading and trailing whitespace.
|
---|
736 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
737 |
|
---|
738 | <h3 class=fn>short <a name="toShort"></a>QLocale::toShort ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
739 | </h3>
|
---|
740 | Returns the short int represented by the localized string <em>s</em>, or
|
---|
741 | 0 if the conversion failed.
|
---|
742 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
743 | *ok to false and success by setting *ok to true.
|
---|
744 | <p> This function ignores leading and trailing whitespace.
|
---|
745 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
746 |
|
---|
747 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString"></a>QLocale::toString ( Q_LLONG i ) const
|
---|
748 | </h3>
|
---|
749 | Returns a localized string representation of <em>i</em>.
|
---|
750 | <p> <p>See also <a href="#toLongLong">toLongLong</a>().
|
---|
751 |
|
---|
752 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-2"></a>QLocale::toString ( short i ) const
|
---|
753 | </h3>
|
---|
754 |
|
---|
755 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
756 | <p> <p>See also <a href="#toShort">toShort</a>().
|
---|
757 |
|
---|
758 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-3"></a>QLocale::toString ( ushort i ) const
|
---|
759 | </h3>
|
---|
760 |
|
---|
761 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
762 | <p> <p>See also <a href="#toUShort">toUShort</a>().
|
---|
763 |
|
---|
764 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-4"></a>QLocale::toString ( int i ) const
|
---|
765 | </h3>
|
---|
766 |
|
---|
767 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
768 | <p> <p>See also <a href="#toInt">toInt</a>().
|
---|
769 |
|
---|
770 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-5"></a>QLocale::toString ( uint i ) const
|
---|
771 | </h3>
|
---|
772 |
|
---|
773 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
774 | <p> <p>See also <a href="#toUInt">toUInt</a>().
|
---|
775 |
|
---|
776 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-6"></a>QLocale::toString ( Q_LONG i ) const
|
---|
777 | </h3>
|
---|
778 |
|
---|
779 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
780 | <p> <p>See also <a href="#toLong">toLong</a>().
|
---|
781 |
|
---|
782 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-7"></a>QLocale::toString ( Q_ULONG i ) const
|
---|
783 | </h3>
|
---|
784 |
|
---|
785 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
786 | <p> <p>See also <a href="#toULong">toULong</a>().
|
---|
787 |
|
---|
788 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-8"></a>QLocale::toString ( Q_ULLONG i ) const
|
---|
789 | </h3>
|
---|
790 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
791 | <p> <p>See also <a href="#toULongLong">toULongLong</a>().
|
---|
792 |
|
---|
793 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-9"></a>QLocale::toString ( float i, char f = 'g', int prec = 6 ) const
|
---|
794 | </h3>
|
---|
795 |
|
---|
796 | <p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
797 | <p> <em>f</em> and <em>prec</em> have the same meaning as in <a href="qstring.html#number">QString::number</a>(double, char, int).
|
---|
798 | <p> <p>See also <a href="#toDouble">toDouble</a>().
|
---|
799 |
|
---|
800 | <h3 class=fn><a href="qstring.html">QString</a> <a name="toString-a"></a>QLocale::toString ( double i, char f = 'g', int prec = 6 ) const
|
---|
801 | </h3>
|
---|
802 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
803 | <p> <em>f</em> and <em>prec</em> have the same meaning as in <a href="qstring.html#number">QString::number</a>(double, char, int).
|
---|
804 | <p> <p>See also <a href="#toDouble">toDouble</a>().
|
---|
805 |
|
---|
806 | <h3 class=fn>uint <a name="toUInt"></a>QLocale::toUInt ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
807 | </h3>
|
---|
808 | Returns the unsigned int represented by the localized string <em>s</em>,
|
---|
809 | or 0 if the conversion failed.
|
---|
810 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
811 | *ok to false and success by setting *ok to true.
|
---|
812 | <p> This function ignores leading and trailing whitespace.
|
---|
813 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
814 |
|
---|
815 | <h3 class=fn>Q_ULONG <a name="toULong"></a>QLocale::toULong ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
816 | </h3>
|
---|
817 | Returns the unsigned long int represented by the localized string
|
---|
818 | <em>s</em>, or 0 if the conversion failed.
|
---|
819 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
820 | *ok to false and success by setting *ok to true.
|
---|
821 | <p> This function ignores leading and trailing whitespace.
|
---|
822 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
823 |
|
---|
824 | <h3 class=fn>Q_ULLONG <a name="toULongLong"></a>QLocale::toULongLong ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
825 | </h3>
|
---|
826 | Returns the unsigned long long int represented by the localized
|
---|
827 | string <em>s</em>, or 0 if the conversion failed.
|
---|
828 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
829 | *ok to false and success by setting *ok to true.
|
---|
830 | <p> This function ignores leading and trailing whitespace.
|
---|
831 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
832 |
|
---|
833 | <h3 class=fn>ushort <a name="toUShort"></a>QLocale::toUShort ( const <a href="qstring.html">QString</a> & s, bool * ok = 0 ) const
|
---|
834 | </h3>
|
---|
835 | Returns the unsigned short int represented by the localized string
|
---|
836 | <em>s</em>, or 0 if the conversion failed.
|
---|
837 | <p> If <em>ok</em> is not 0, reports failure by setting
|
---|
838 | *ok to false and success by setting *ok to true.
|
---|
839 | <p> This function ignores leading and trailing whitespace.
|
---|
840 | <p> <p>See also <a href="#toString">toString</a>().
|
---|
841 |
|
---|
842 | <!-- eof -->
|
---|
843 | <hr><p>
|
---|
844 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
845 | Copyright © 1995-2007
|
---|
846 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
847 | <table width=100% cellspacing=0 border=0><tr>
|
---|
848 | <td>Copyright © 2007
|
---|
849 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
850 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
851 | </table></div></address></body>
|
---|
852 | </html>
|
---|