You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/man/man3/tqlocale.3qt

1250 lines
34 KiB

'\" t
.TH QLocale 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QLocale \- Converts between numbers and their string representations in various languages
.SH SYNOPSIS
Almost all the functions in this class are reentrant when TQt is built with thread support. The exception is \fBsetDefault\fR(). </p>
.PP
\fC#include <ntqlocale.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBLanguage\fR { 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 }"
.br
.ti -1c
.BI "enum \fBCountry\fR { 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 }"
.br
.ti -1c
.BI "\fBQLocale\fR ()"
.br
.ti -1c
.BI "\fBQLocale\fR ( const QString & name )"
.br
.ti -1c
.BI "\fBQLocale\fR ( Language language, Country country = AnyCountry )"
.br
.ti -1c
.BI "\fBQLocale\fR ( const QLocale & other )"
.br
.ti -1c
.BI "QLocale & \fBoperator=\fR ( const QLocale & other )"
.br
.ti -1c
.BI "Language \fBlanguage\fR () const"
.br
.ti -1c
.BI "Country \fBcountry\fR () const"
.br
.ti -1c
.BI "QString \fBname\fR () const"
.br
.ti -1c
.BI "short \fBtoShort\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "ushort \fBtoUShort\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "int \fBtoInt\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "uint \fBtoUInt\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "TQ_LONG \fBtoLong\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "TQ_ULONG \fBtoULong\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "TQ_LLONG \fBtoLongLong\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "TQ_ULLONG \fBtoULongLong\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "float \fBtoFloat\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "double \fBtoDouble\fR ( const QString & s, bool * ok = 0 ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( short i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( ushort i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( int i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( uint i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( TQ_LONG i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( TQ_ULONG i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( TQ_LLONG i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( TQ_ULLONG i ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( float i, char f = 'g', int prec = 6 ) const"
.br
.ti -1c
.BI "QString \fBtoString\fR ( double i, char f = 'g', int prec = 6 ) const"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "QString \fBlanguageToString\fR ( Language language )"
.br
.ti -1c
.BI "QString \fBcountryToString\fR ( Country country )"
.br
.ti -1c
.BI "void \fBsetDefault\fR ( const QLocale & locale )"
.br
.ti -1c
.BI "QLocale \fBc\fR ()"
.br
.ti -1c
.BI "QLocale \fBsystem\fR ()"
.br
.in -1c
.SH DESCRIPTION
The QLocale class converts between numbers and their string representations in various languages.
.PP
It is initialized with a country/language pair in its constructor and offers number-to-string and string-to-number conversion functions simmilar to those in QString.
.PP
.nf
.br
QLocale egyptian(QLocale::Arabic, QLocale::Egypt);
.br
QString s1 = egyptian.toString(1.571429E+07, 'e');
.br
QString s2 = egyptian.toString(10);
.br
.br
double d = egyptian.toDouble(s1);
.br
int s2 = egyptian.toInt(s2);
.br
.fi
.PP
QLocale supports the concept of a default locale, which is determined from the system's locale settings at application startup. The default locale can be changed by calling the static member setDefault(). The default locale has the following effects:
.TP
If a QLocale object is constructed with the default constructor, it will use the default locale's settings.
.TP
QString::toDouble() interprets the string according to the default locale. If this fails, it falls back on the "C" locale.
.TP
QString::arg() uses the default locale to format a number when its position specifier in the format string contains an 'L', e.g. "%L1".
.PP
.nf
.br
QLocale::setDefault(QLocale(QLocale::Hebrew, QLocale::Israel));
.br
QLocale hebrew; // Constructs a default QLocale
.br
QString s1 = hebrew.toString(15714.3, 'e');
.br
.br
bool ok;
.br
double d;
.br
.br
QLocale::setDefault(QLocale::C);
.br
d = QString( "1234,56" ).toDouble(&ok); // ok == false
.br
d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
.br
.br
QLocale::setDefault(QLocale::German);
.br
d = QString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
.br
d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
.br
.br
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
.br
str = QString( "%1 %L2 %L3" )
.br
.arg( 12345 )
.br
.arg( 12345 )
.br
.arg( 12345, 0, 16 );
.br
// str == "12345 12,345 3039"
.br
.fi
.PP
When a language/country pair is specified in the constructor, one of three things can happen:
.TP
If the language/country pair is found in the database, it is used.
.TP
If the language is found but the country is not, or if the country is AnyCountry, the language is used with the most appropriate available country (for example, Germany for German),
.TP
If neither the language nor the country are found, QLocale defaults to the default locale (see setDefault()).
.PP
The "C" locale is identical to English/UnitedStates.
.PP
Use language() and country() to determine the actual language and country values used.
.PP
An alternative method for constructing a QLocale object is by specifying the locale name.
.PP
.nf
.br
QLocale korean("ko");
.br
QLocale swiss("de_CH");
.br
.fi
.PP
This constructor converts the locale name to a language/country pair; it does not use the system locale database.
.PP
All the methods in QLocale, with the exception of setDefault(), are reentrant.
.PP
See also QString::toDouble(), QString::arg(), and Text Related Classes.
.PP
The double-to-string and string-to-double conversion functions are covered by the following licenses:
.PP
Copyright (c) 1991 by AT&T.
.PP
Permission to use, copy, modify, and distribute this software for any purpose without fee is hereby granted, provided that this entire notice is included in all copies of any software which is or includes a copy or modification of this software and in all copies of the supporting documentation for such software.
.PP
THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
.PP
This product includes software developed by the University of California, Berkeley and its contributors.
.SS "Member Type Documentation"
.SH "QLocale::Country"
This enumerated type is used to specify a country.
.TP
\fCQLocale::AnyCountry\fR
.TP
\fCQLocale::Afghanistan\fR
.TP
\fCQLocale::Albania\fR
.TP
\fCQLocale::Algeria\fR
.TP
\fCQLocale::AmericanSamoa\fR
.TP
\fCQLocale::Andorra\fR
.TP
\fCQLocale::Angola\fR
.TP
\fCQLocale::Anguilla\fR
.TP
\fCQLocale::Antarctica\fR
.TP
\fCQLocale::AntiguaAndBarbuda\fR
.TP
\fCQLocale::Argentina\fR
.TP
\fCQLocale::Armenia\fR
.TP
\fCQLocale::Aruba\fR
.TP
\fCQLocale::Australia\fR
.TP
\fCQLocale::Austria\fR
.TP
\fCQLocale::Azerbaijan\fR
.TP
\fCQLocale::Bahamas\fR
.TP
\fCQLocale::Bahrain\fR
.TP
\fCQLocale::Bangladesh\fR
.TP
\fCQLocale::Barbados\fR
.TP
\fCQLocale::Belarus\fR
.TP
\fCQLocale::Belgium\fR
.TP
\fCQLocale::Belize\fR
.TP
\fCQLocale::Benin\fR
.TP
\fCQLocale::Bermuda\fR
.TP
\fCQLocale::Bhutan\fR
.TP
\fCQLocale::Bolivia\fR
.TP
\fCQLocale::BosniaAndHerzegowina\fR
.TP
\fCQLocale::Botswana\fR
.TP
\fCQLocale::BouvetIsland\fR
.TP
\fCQLocale::Brazil\fR
.TP
\fCQLocale::BritishIndianOceanTerritory\fR
.TP
\fCQLocale::BruneiDarussalam\fR
.TP
\fCQLocale::Bulgaria\fR
.TP
\fCQLocale::BurkinaFaso\fR
.TP
\fCQLocale::Burundi\fR
.TP
\fCQLocale::Cambodia\fR
.TP
\fCQLocale::Cameroon\fR
.TP
\fCQLocale::Canada\fR
.TP
\fCQLocale::CapeVerde\fR
.TP
\fCQLocale::CaymanIslands\fR
.TP
\fCQLocale::CentralAfricanRepublic\fR
.TP
\fCQLocale::Chad\fR
.TP
\fCQLocale::Chile\fR
.TP
\fCQLocale::China\fR
.TP
\fCQLocale::ChristmasIsland\fR
.TP
\fCQLocale::CocosIslands\fR
.TP
\fCQLocale::Colombia\fR
.TP
\fCQLocale::Comoros\fR
.TP
\fCQLocale::DemocraticRepublicOfCongo\fR
.TP
\fCQLocale::PeoplesRepublicOfCongo\fR
.TP
\fCQLocale::CookIslands\fR
.TP
\fCQLocale::CostaRica\fR
.TP
\fCQLocale::IvoryCoast\fR
.TP
\fCQLocale::Croatia\fR
.TP
\fCQLocale::Cuba\fR
.TP
\fCQLocale::Cyprus\fR
.TP
\fCQLocale::CzechRepublic\fR
.TP
\fCQLocale::Denmark\fR
.TP
\fCQLocale::Djibouti\fR
.TP
\fCQLocale::Dominica\fR
.TP
\fCQLocale::DominicanRepublic\fR
.TP
\fCQLocale::EastTimor\fR
.TP
\fCQLocale::Ecuador\fR
.TP
\fCQLocale::Egypt\fR
.TP
\fCQLocale::ElSalvador\fR
.TP
\fCQLocale::EquatorialGuinea\fR
.TP
\fCQLocale::Eritrea\fR
.TP
\fCQLocale::Estonia\fR
.TP
\fCQLocale::Ethiopia\fR
.TP
\fCQLocale::FalklandIslands\fR
.TP
\fCQLocale::FaroeIslands\fR
.TP
\fCQLocale::FijiCountry\fR
.TP
\fCQLocale::Finland\fR
.TP
\fCQLocale::France\fR
.TP
\fCQLocale::MetropolitanFrance\fR
.TP
\fCQLocale::FrenchGuiana\fR
.TP
\fCQLocale::FrenchPolynesia\fR
.TP
\fCQLocale::FrenchSouthernTerritories\fR
.TP
\fCQLocale::Gabon\fR
.TP
\fCQLocale::Gambia\fR
.TP
\fCQLocale::Georgia\fR
.TP
\fCQLocale::Germany\fR
.TP
\fCQLocale::Ghana\fR
.TP
\fCQLocale::Gibraltar\fR
.TP
\fCQLocale::Greece\fR
.TP
\fCQLocale::Greenland\fR
.TP
\fCQLocale::Grenada\fR
.TP
\fCQLocale::Guadeloupe\fR
.TP
\fCQLocale::Guam\fR
.TP
\fCQLocale::Guatemala\fR
.TP
\fCQLocale::Guinea\fR
.TP
\fCQLocale::GuineaBissau\fR
.TP
\fCQLocale::Guyana\fR
.TP
\fCQLocale::Haiti\fR
.TP
\fCQLocale::HeardAndMcDonaldIslands\fR
.TP
\fCQLocale::Honduras\fR
.TP
\fCQLocale::HongKong\fR
.TP
\fCQLocale::Hungary\fR
.TP
\fCQLocale::Iceland\fR
.TP
\fCQLocale::India\fR
.TP
\fCQLocale::Indonesia\fR
.TP
\fCQLocale::Iran\fR
.TP
\fCQLocale::Iraq\fR
.TP
\fCQLocale::Ireland\fR
.TP
\fCQLocale::Israel\fR
.TP
\fCQLocale::Italy\fR
.TP
\fCQLocale::Jamaica\fR
.TP
\fCQLocale::Japan\fR
.TP
\fCQLocale::Jordan\fR
.TP
\fCQLocale::Kazakhstan\fR
.TP
\fCQLocale::Kenya\fR
.TP
\fCQLocale::Kiribati\fR
.TP
\fCQLocale::DemocraticRepublicOfKorea\fR
.TP
\fCQLocale::RepublicOfKorea\fR
.TP
\fCQLocale::Kuwait\fR
.TP
\fCQLocale::Kyrgyzstan\fR
.TP
\fCQLocale::Lao\fR
.TP
\fCQLocale::Latvia\fR
.TP
\fCQLocale::Lebanon\fR
.TP
\fCQLocale::Lesotho\fR
.TP
\fCQLocale::Liberia\fR
.TP
\fCQLocale::LibyanArabJamahiriya\fR
.TP
\fCQLocale::Liechtenstein\fR
.TP
\fCQLocale::Lithuania\fR
.TP
\fCQLocale::Luxembourg\fR
.TP
\fCQLocale::Macau\fR
.TP
\fCQLocale::Macedonia\fR
.TP
\fCQLocale::Madagascar\fR
.TP
\fCQLocale::Malawi\fR
.TP
\fCQLocale::Malaysia\fR
.TP
\fCQLocale::Maldives\fR
.TP
\fCQLocale::Mali\fR
.TP
\fCQLocale::Malta\fR
.TP
\fCQLocale::MarshallIslands\fR
.TP
\fCQLocale::Martinique\fR
.TP
\fCQLocale::Mauritania\fR
.TP
\fCQLocale::Mauritius\fR
.TP
\fCQLocale::Mayotte\fR
.TP
\fCQLocale::Mexico\fR
.TP
\fCQLocale::Micronesia\fR
.TP
\fCQLocale::Moldova\fR
.TP
\fCQLocale::Monaco\fR
.TP
\fCQLocale::Mongolia\fR
.TP
\fCQLocale::Montserrat\fR
.TP
\fCQLocale::Morocco\fR
.TP
\fCQLocale::Mozambique\fR
.TP
\fCQLocale::Myanmar\fR
.TP
\fCQLocale::Namibia\fR
.TP
\fCQLocale::NauruCountry\fR
.TP
\fCQLocale::Nepal\fR
.TP
\fCQLocale::Netherlands\fR
.TP
\fCQLocale::NetherlandsAntilles\fR
.TP
\fCQLocale::NewCaledonia\fR
.TP
\fCQLocale::NewZealand\fR
.TP
\fCQLocale::Nicaragua\fR
.TP
\fCQLocale::Niger\fR
.TP
\fCQLocale::Nigeria\fR
.TP
\fCQLocale::Niue\fR
.TP
\fCQLocale::NorfolkIsland\fR
.TP
\fCQLocale::NorthernMarianaIslands\fR
.TP
\fCQLocale::Norway\fR
.TP
\fCQLocale::Oman\fR
.TP
\fCQLocale::Pakistan\fR
.TP
\fCQLocale::Palau\fR
.TP
\fCQLocale::PalestinianTerritory\fR
.TP
\fCQLocale::Panama\fR
.TP
\fCQLocale::PapuaNewGuinea\fR
.TP
\fCQLocale::Paraguay\fR
.TP
\fCQLocale::Peru\fR
.TP
\fCQLocale::Philippines\fR
.TP
\fCQLocale::Pitcairn\fR
.TP
\fCQLocale::Poland\fR
.TP
\fCQLocale::Portugal\fR
.TP
\fCQLocale::PuertoRico\fR
.TP
\fCQLocale::Qatar\fR
.TP
\fCQLocale::Reunion\fR
.TP
\fCQLocale::Romania\fR
.TP
\fCQLocale::RussianFederation\fR
.TP
\fCQLocale::Rwanda\fR
.TP
\fCQLocale::SaintKittsAndNevis\fR
.TP
\fCQLocale::StLucia\fR
.TP
\fCQLocale::StVincentAndTheGrenadines\fR
.TP
\fCQLocale::Samoa\fR
.TP
\fCQLocale::SanMarino\fR
.TP
\fCQLocale::SaoTomeAndPrincipe\fR
.TP
\fCQLocale::SaudiArabia\fR
.TP
\fCQLocale::Senegal\fR
.TP
\fCQLocale::Seychelles\fR
.TP
\fCQLocale::SierraLeone\fR
.TP
\fCQLocale::Singapore\fR
.TP
\fCQLocale::Slovakia\fR
.TP
\fCQLocale::Slovenia\fR
.TP
\fCQLocale::SolomonIslands\fR
.TP
\fCQLocale::Somalia\fR
.TP
\fCQLocale::SouthAfrica\fR
.TP
\fCQLocale::SouthGeorgiaAndTheSouthSandwichIslands\fR
.TP
\fCQLocale::Spain\fR
.TP
\fCQLocale::SriLanka\fR
.TP
\fCQLocale::StHelena\fR
.TP
\fCQLocale::StPierreAndMiquelon\fR
.TP
\fCQLocale::Sudan\fR
.TP
\fCQLocale::Suriname\fR
.TP
\fCQLocale::SvalbardAndJanMayenIslands\fR
.TP
\fCQLocale::Swaziland\fR
.TP
\fCQLocale::Sweden\fR
.TP
\fCQLocale::Switzerland\fR
.TP
\fCQLocale::SyrianArabRepublic\fR
.TP
\fCQLocale::Taiwan\fR
.TP
\fCQLocale::Tajikistan\fR
.TP
\fCQLocale::Tanzania\fR
.TP
\fCQLocale::Thailand\fR
.TP
\fCQLocale::Togo\fR
.TP
\fCQLocale::Tokelau\fR
.TP
\fCQLocale::TongaCountry\fR
.TP
\fCQLocale::TrinidadAndTobago\fR
.TP
\fCQLocale::Tunisia\fR
.TP
\fCQLocale::Turkey\fR
.TP
\fCQLocale::Turkmenistan\fR
.TP
\fCQLocale::TurksAndCaicosIslands\fR
.TP
\fCQLocale::Tuvalu\fR
.TP
\fCQLocale::Uganda\fR
.TP
\fCQLocale::Ukraine\fR
.TP
\fCQLocale::UnitedArabEmirates\fR
.TP
\fCQLocale::UnitedKingdom\fR
.TP
\fCQLocale::UnitedStates\fR
.TP
\fCQLocale::UnitedStatesMinorOutlyingIslands\fR
.TP
\fCQLocale::Uruguay\fR
.TP
\fCQLocale::Uzbekistan\fR
.TP
\fCQLocale::Vanuatu\fR
.TP
\fCQLocale::VaticanCityState\fR
.TP
\fCQLocale::Venezuela\fR
.TP
\fCQLocale::VietNam\fR
.TP
\fCQLocale::BritishVirginIslands\fR
.TP
\fCQLocale::USVirginIslands\fR
.TP
\fCQLocale::WallisAndFutunaIslands\fR
.TP
\fCQLocale::WesternSahara\fR
.TP
\fCQLocale::Yemen\fR
.TP
\fCQLocale::Yugoslavia\fR
.TP
\fCQLocale::Zambia\fR
.TP
\fCQLocale::Zimbabwe\fR
.SH "QLocale::Language"
This enumerated type is used to specify a language.
.TP
\fCQLocale::C\fR - Identical to English/UnitedStates
.TP
\fCQLocale::Abkhazian\fR
.TP
\fCQLocale::Afan\fR
.TP
\fCQLocale::Afar\fR
.TP
\fCQLocale::Afrikaans\fR
.TP
\fCQLocale::Albanian\fR
.TP
\fCQLocale::Amharic\fR
.TP
\fCQLocale::Arabic\fR
.TP
\fCQLocale::Armenian\fR
.TP
\fCQLocale::Assamese\fR
.TP
\fCQLocale::Aymara\fR
.TP
\fCQLocale::Azerbaijani\fR
.TP
\fCQLocale::Bashkir\fR
.TP
\fCQLocale::Basque\fR
.TP
\fCQLocale::Bengali\fR
.TP
\fCQLocale::Bhutani\fR
.TP
\fCQLocale::Bihari\fR
.TP
\fCQLocale::Bislama\fR
.TP
\fCQLocale::Breton\fR
.TP
\fCQLocale::Bulgarian\fR
.TP
\fCQLocale::Burmese\fR
.TP
\fCQLocale::Byelorussian\fR
.TP
\fCQLocale::Cambodian\fR
.TP
\fCQLocale::Catalan\fR
.TP
\fCQLocale::Chinese\fR
.TP
\fCQLocale::Corsican\fR
.TP
\fCQLocale::Croatian\fR
.TP
\fCQLocale::Czech\fR
.TP
\fCQLocale::Danish\fR
.TP
\fCQLocale::Dutch\fR
.TP
\fCQLocale::English\fR
.TP
\fCQLocale::Esperanto\fR
.TP
\fCQLocale::Estonian\fR
.TP
\fCQLocale::Faroese\fR
.TP
\fCQLocale::FijiLanguage\fR
.TP
\fCQLocale::Finnish\fR
.TP
\fCQLocale::French\fR
.TP
\fCQLocale::Frisian\fR
.TP
\fCQLocale::Gaelic\fR
.TP
\fCQLocale::Galician\fR
.TP
\fCQLocale::Georgian\fR
.TP
\fCQLocale::German\fR
.TP
\fCQLocale::Greek\fR
.TP
\fCQLocale::Greenlandic\fR
.TP
\fCQLocale::Guarani\fR
.TP
\fCQLocale::Gujarati\fR
.TP
\fCQLocale::Hausa\fR
.TP
\fCQLocale::Hebrew\fR
.TP
\fCQLocale::Hindi\fR
.TP
\fCQLocale::Hungarian\fR
.TP
\fCQLocale::Icelandic\fR
.TP
\fCQLocale::Indonesian\fR
.TP
\fCQLocale::Interlingua\fR
.TP
\fCQLocale::Interlingue\fR
.TP
\fCQLocale::Inuktitut\fR
.TP
\fCQLocale::Inupiak\fR
.TP
\fCQLocale::Irish\fR
.TP
\fCQLocale::Italian\fR
.TP
\fCQLocale::Japanese\fR
.TP
\fCQLocale::Javanese\fR
.TP
\fCQLocale::Kannada\fR
.TP
\fCQLocale::Kashmiri\fR
.TP
\fCQLocale::Kazakh\fR
.TP
\fCQLocale::Kinyarwanda\fR
.TP
\fCQLocale::Kirghiz\fR
.TP
\fCQLocale::Korean\fR
.TP
\fCQLocale::Kurdish\fR
.TP
\fCQLocale::Kurundi\fR
.TP
\fCQLocale::Laothian\fR
.TP
\fCQLocale::Latin\fR
.TP
\fCQLocale::Latvian\fR
.TP
\fCQLocale::Lingala\fR
.TP
\fCQLocale::Lithuanian\fR
.TP
\fCQLocale::Macedonian\fR
.TP
\fCQLocale::Malagasy\fR
.TP
\fCQLocale::Malay\fR
.TP
\fCQLocale::Malayalam\fR
.TP
\fCQLocale::Maltese\fR
.TP
\fCQLocale::Maori\fR
.TP
\fCQLocale::Marathi\fR
.TP
\fCQLocale::Moldavian\fR
.TP
\fCQLocale::Mongolian\fR
.TP
\fCQLocale::NauruLanguage\fR
.TP
\fCQLocale::Nepali\fR
.TP
\fCQLocale::Norwegian\fR
.TP
\fCQLocale::Occitan\fR
.TP
\fCQLocale::Oriya\fR
.TP
\fCQLocale::Pashto\fR
.TP
\fCQLocale::Persian\fR
.TP
\fCQLocale::Polish\fR
.TP
\fCQLocale::Portuguese\fR
.TP
\fCQLocale::Punjabi\fR
.TP
\fCQLocale::Quechua\fR
.TP
\fCQLocale::RhaetoRomance\fR
.TP
\fCQLocale::Romanian\fR
.TP
\fCQLocale::Russian\fR
.TP
\fCQLocale::Samoan\fR
.TP
\fCQLocale::Sangho\fR
.TP
\fCQLocale::Sanskrit\fR
.TP
\fCQLocale::Serbian\fR
.TP
\fCQLocale::SerboCroatian\fR
.TP
\fCQLocale::Sesotho\fR
.TP
\fCQLocale::Setswana\fR
.TP
\fCQLocale::Shona\fR
.TP
\fCQLocale::Sindhi\fR
.TP
\fCQLocale::Singhalese\fR
.TP
\fCQLocale::Siswati\fR
.TP
\fCQLocale::Slovak\fR
.TP
\fCQLocale::Slovenian\fR
.TP
\fCQLocale::Somali\fR
.TP
\fCQLocale::Spanish\fR
.TP
\fCQLocale::Sundanese\fR
.TP
\fCQLocale::Swahili\fR
.TP
\fCQLocale::Swedish\fR
.TP
\fCQLocale::Tagalog\fR
.TP
\fCQLocale::Tajik\fR
.TP
\fCQLocale::Tamil\fR
.TP
\fCQLocale::Tatar\fR
.TP
\fCQLocale::Telugu\fR
.TP
\fCQLocale::Thai\fR
.TP
\fCQLocale::Tibetan\fR
.TP
\fCQLocale::Tigrinya\fR
.TP
\fCQLocale::TongaLanguage\fR
.TP
\fCQLocale::Tsonga\fR
.TP
\fCQLocale::Turkish\fR
.TP
\fCQLocale::Turkmen\fR
.TP
\fCQLocale::Twi\fR
.TP
\fCQLocale::Uigur\fR
.TP
\fCQLocale::Ukrainian\fR
.TP
\fCQLocale::Urdu\fR
.TP
\fCQLocale::Uzbek\fR
.TP
\fCQLocale::Vietnamese\fR
.TP
\fCQLocale::Volapuk\fR
.TP
\fCQLocale::Welsh\fR
.TP
\fCQLocale::Wolof\fR
.TP
\fCQLocale::Xhosa\fR
.TP
\fCQLocale::Yiddish\fR
.TP
\fCQLocale::Yoruba\fR
.TP
\fCQLocale::Zhuang\fR
.TP
\fCQLocale::Zulu\fR
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QLocale::QLocale ()"
Constructs a QLocale object initialized with the default locale.
.PP
See also setDefault().
.SH "QLocale::QLocale ( const QString & name )"
Constructs a QLocale object with the specified \fIname\fR, which has the format" language[_country][.codeset][@modifier]" or "C", where:
.TP
language is a lowercase, two-letter, ISO 639 language code,
.TP
territory is an uppercase, two-letter, ISO 3166 country code,
.TP
and codeset and modifier are ignored.
.PP
If the string violates the locale format, or language is not a valid ISO 369 code, the "C" locale is used instead. If country is not present, or is not a valid ISO 3166 code, the most appropriate country is chosen for the specified language.
.PP
The language and country codes are converted to their respective Language and Country enums. After this conversion is performed the constructor behaves exactly like QLocale(Country, Language).
.PP
This constructor is much slower than QLocale(Country, Language).
.PP
See also name().
.SH "QLocale::QLocale ( Language language, Country country = AnyCountry )"
Constructs a QLocale object with the specified \fIlanguage\fR and \fIcountry\fR.
.TP
If the language/country pair is found in the database, it is used.
.TP
If the language is found but the country is not, or if the country is AnyCountry, the language is used with the most appropriate available country (for example, Germany for German),
.TP
If neither the language nor the country are found, QLocale defaults to the default locale (see setDefault()).
.PP
The language and country that are actually used can be queried using language() and country().
.PP
See also setDefault(), language(), and country().
.SH "QLocale::QLocale ( const QLocale & other )"
Constructs a QLocale object as a copy of \fIother\fR.
.SH "QLocale QLocale::c ()\fC [static]\fR"
Returns a QLocale object initialized to the "C" locale.
.PP
See also system().
.SH "Country QLocale::country () const"
Returns the country of this locale.
.PP
See also QLocale().
.SH "QString QLocale::countryToString ( Country country )\fC [static]\fR"
Returns a QString containing the name of \fIcountry\fR.
.SH "Language QLocale::language () const"
Returns the language of this locale.
.PP
See also QLocale().
.SH "QString QLocale::languageToString ( Language language )\fC [static]\fR"
Returns a QString containing the name of \fIlanguage\fR.
.SH "QString QLocale::name () const"
Returns the language and country of this locale as a string of the form "language_country", where language is a lowercase, two-letter ISO 639 language code, and country is an uppercase, two-letter ISO 3166 country code.
.PP
See also QLocale().
.SH "QLocale & QLocale::operator= ( const QLocale & other )"
Assigns \fIother\fR to this QLocale object and returns a reference to this QLocale object.
.SH "void QLocale::setDefault ( const QLocale & locale )\fC [static]\fR"
\fBWarning:\fR This function is \fInot\fR reentrant.</p>
.PP
Sets the global default locale to \fIlocale\fR. These values are used when a QLocale object is constructed with no arguments. If this function is not called, the system's locale is used.
.PP
\fBWarning:\fR In a multithreaded application, the default locale should be set at application startup, before any non-GUI threads are created.
.PP
See also system() and c().
.SH "QLocale QLocale::system ()\fC [static]\fR"
Returns a QLocale object initialized to the system locale.
.SH "double QLocale::toDouble ( const QString & s, bool * ok = 0 ) const"
Returns the double represented by the localized string \fIs\fR, or 0.0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
Unlike QString::toDouble(), this function does not fall back to the "C" locale if the string cannot be interpreted in this locale.
.PP
.nf
.br
bool ok;
.br
double d;
.br
.br
QLocale c(QLocale::C);
.br
d = c.toDouble( "1234.56", &ok ); // ok == true, d == 1234.56
.br
d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56
.br
d = c.toDouble( "1234,56", &ok ); // ok == false
.br
.br
QLocale german(QLocale::German);
.br
d = german.toDouble( "1234,56", &ok ); // ok == true, d == 1234.56
.br
d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56
.br
d = german.toDouble( "1234.56", &ok ); // ok == false
.br
.br
d = german.toDouble( "1.234", &ok ); // ok == true, d == 1234.0
.br
.fi
.PP
Notice that the last conversion returns 1234.0, because '.' is the thousands group separator in the German locale.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString() and QString::toDouble().
.SH "float QLocale::toFloat ( const QString & s, bool * ok = 0 ) const"
Returns the float represented by the localized string \fIs\fR, or 0.0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "int QLocale::toInt ( const QString & s, bool * ok = 0 ) const"
Returns the int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "TQ_LONG QLocale::toLong ( const QString & s, bool * ok = 0 ) const"
Returns the long int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "TQ_LLONG QLocale::toLongLong ( const QString & s, bool * ok = 0 ) const"
Returns the long long int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "short QLocale::toShort ( const QString & s, bool * ok = 0 ) const"
Returns the short int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "QString QLocale::toString ( TQ_LLONG i ) const"
Returns a localized string representation of \fIi\fR.
.PP
See also toLongLong().
.SH "QString QLocale::toString ( short i ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
See also toShort().
.SH "QString QLocale::toString ( ushort i ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
See also toUShort().
.SH "QString QLocale::toString ( int i ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
See also toInt().
.SH "QString QLocale::toString ( uint i ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
See also toUInt().
.SH "QString QLocale::toString ( TQ_LONG i ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
See also toLong().
.SH "QString QLocale::toString ( TQ_ULONG i ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
See also toULong().
.SH "QString QLocale::toString ( TQ_ULLONG i ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
See also toULongLong().
.SH "QString QLocale::toString ( float i, char f = 'g', int prec = 6 ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIf\fR and \fIprec\fR have the same meaning as in QString::number(double, char, int).
.PP
See also toDouble().
.SH "QString QLocale::toString ( double i, char f = 'g', int prec = 6 ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIf\fR and \fIprec\fR have the same meaning as in QString::number(double, char, int).
.PP
See also toDouble().
.SH "uint QLocale::toUInt ( const QString & s, bool * ok = 0 ) const"
Returns the unsigned int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "TQ_ULONG QLocale::toULong ( const QString & s, bool * ok = 0 ) const"
Returns the unsigned long int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "TQ_ULLONG QLocale::toULongLong ( const QString & s, bool * ok = 0 ) const"
Returns the unsigned long long int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "ushort QLocale::toUShort ( const QString & s, bool * ok = 0 ) const"
Returns the unsigned short int represented by the localized string \fIs\fR, or 0 if the conversion failed.
.PP
If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true.
.PP
This function ignores leading and trailing whitespace.
.PP
See also toString().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/ntqlocale.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqlocale.3qt) and the Qt
version (3.3.8).