'\" t .TH TQLocale 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 TQLocale \- 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().

.PP \fC#include \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 "\fBTQLocale\fR ()" .br .ti -1c .BI "\fBTQLocale\fR ( const TQString & name )" .br .ti -1c .BI "\fBTQLocale\fR ( Language language, Country country = AnyCountry )" .br .ti -1c .BI "\fBTQLocale\fR ( const TQLocale & other )" .br .ti -1c .BI "TQLocale & \fBoperator=\fR ( const TQLocale & other )" .br .ti -1c .BI "Language \fBlanguage\fR () const" .br .ti -1c .BI "Country \fBcountry\fR () const" .br .ti -1c .BI "TQString \fBname\fR () const" .br .ti -1c .BI "short \fBtoShort\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "ushort \fBtoUShort\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "int \fBtoInt\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "uint \fBtoUInt\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "TQ_LONG \fBtoLong\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "TQ_ULONG \fBtoULong\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "TQ_LLONG \fBtoLongLong\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "TQ_ULLONG \fBtoULongLong\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "float \fBtoFloat\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "double \fBtoDouble\fR ( const TQString & s, bool * ok = 0 ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( short i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( ushort i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( int i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( uint i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( TQ_LONG i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( TQ_ULONG i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( TQ_LLONG i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( TQ_ULLONG i ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( float i, char f = 'g', int prec = 6 ) const" .br .ti -1c .BI "TQString \fBtoString\fR ( double i, char f = 'g', int prec = 6 ) const" .br .in -1c .SS "Static Public Members" .in +1c .ti -1c .BI "TQString \fBlanguageToString\fR ( Language language )" .br .ti -1c .BI "TQString \fBcountryToString\fR ( Country country )" .br .ti -1c .BI "void \fBsetDefault\fR ( const TQLocale & locale )" .br .ti -1c .BI "TQLocale \fBc\fR ()" .br .ti -1c .BI "TQLocale \fBsystem\fR ()" .br .in -1c .SH DESCRIPTION The TQLocale 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 TQString. .PP .nf .br TQLocale egyptian(TQLocale::Arabic, TQLocale::Egypt); .br TQString s1 = egyptian.toString(1.571429E+07, 'e'); .br TQString s2 = egyptian.toString(10); .br .br double d = egyptian.toDouble(s1); .br int s2 = egyptian.toInt(s2); .br .fi .PP TQLocale 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 TQLocale object is constructed with the default constructor, it will use the default locale's settings. .TP TQString::toDouble() interprets the string according to the default locale. If this fails, it falls back on the "C" locale. .TP TQString::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 TQLocale::setDefault(TQLocale(TQLocale::Hebrew, TQLocale::Israel)); .br TQLocale hebrew; // Constructs a default TQLocale .br TQString s1 = hebrew.toString(15714.3, 'e'); .br .br bool ok; .br double d; .br .br TQLocale::setDefault(TQLocale::C); .br d = TQString( "1234,56" ).toDouble(&ok); // ok == false .br d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 .br .br TQLocale::setDefault(TQLocale::German); .br d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56 .br d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 .br .br TQLocale::setDefault(TQLocale(TQLocale::English, TQLocale::UnitedStates)); .br str = TQString( "%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, TQLocale 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 TQLocale object is by specifying the locale name. .PP .nf .br TQLocale korean("ko"); .br TQLocale 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 TQLocale, with the exception of setDefault(), are reentrant. .PP See also TQString::toDouble(), TQString::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 "TQLocale::Country" This enumerated type is used to specify a country. .TP \fCTQLocale::AnyCountry\fR .TP \fCTQLocale::Afghanistan\fR .TP \fCTQLocale::Albania\fR .TP \fCTQLocale::Algeria\fR .TP \fCTQLocale::AmericanSamoa\fR .TP \fCTQLocale::Andorra\fR .TP \fCTQLocale::Angola\fR .TP \fCTQLocale::Anguilla\fR .TP \fCTQLocale::Antarctica\fR .TP \fCTQLocale::AntiguaAndBarbuda\fR .TP \fCTQLocale::Argentina\fR .TP \fCTQLocale::Armenia\fR .TP \fCTQLocale::Aruba\fR .TP \fCTQLocale::Australia\fR .TP \fCTQLocale::Austria\fR .TP \fCTQLocale::Azerbaijan\fR .TP \fCTQLocale::Bahamas\fR .TP \fCTQLocale::Bahrain\fR .TP \fCTQLocale::Bangladesh\fR .TP \fCTQLocale::Barbados\fR .TP \fCTQLocale::Belarus\fR .TP \fCTQLocale::Belgium\fR .TP \fCTQLocale::Belize\fR .TP \fCTQLocale::Benin\fR .TP \fCTQLocale::Bermuda\fR .TP \fCTQLocale::Bhutan\fR .TP \fCTQLocale::Bolivia\fR .TP \fCTQLocale::BosniaAndHerzegowina\fR .TP \fCTQLocale::Botswana\fR .TP \fCTQLocale::BouvetIsland\fR .TP \fCTQLocale::Brazil\fR .TP \fCTQLocale::BritishIndianOceanTerritory\fR .TP \fCTQLocale::BruneiDarussalam\fR .TP \fCTQLocale::Bulgaria\fR .TP \fCTQLocale::BurkinaFaso\fR .TP \fCTQLocale::Burundi\fR .TP \fCTQLocale::Cambodia\fR .TP \fCTQLocale::Cameroon\fR .TP \fCTQLocale::Canada\fR .TP \fCTQLocale::CapeVerde\fR .TP \fCTQLocale::CaymanIslands\fR .TP \fCTQLocale::CentralAfricanRepublic\fR .TP \fCTQLocale::Chad\fR .TP \fCTQLocale::Chile\fR .TP \fCTQLocale::China\fR .TP \fCTQLocale::ChristmasIsland\fR .TP \fCTQLocale::CocosIslands\fR .TP \fCTQLocale::Colombia\fR .TP \fCTQLocale::Comoros\fR .TP \fCTQLocale::DemocraticRepublicOfCongo\fR .TP \fCTQLocale::PeoplesRepublicOfCongo\fR .TP \fCTQLocale::CookIslands\fR .TP \fCTQLocale::CostaRica\fR .TP \fCTQLocale::IvoryCoast\fR .TP \fCTQLocale::Croatia\fR .TP \fCTQLocale::Cuba\fR .TP \fCTQLocale::Cyprus\fR .TP \fCTQLocale::CzechRepublic\fR .TP \fCTQLocale::Denmark\fR .TP \fCTQLocale::Djibouti\fR .TP \fCTQLocale::Dominica\fR .TP \fCTQLocale::DominicanRepublic\fR .TP \fCTQLocale::EastTimor\fR .TP \fCTQLocale::Ecuador\fR .TP \fCTQLocale::Egypt\fR .TP \fCTQLocale::ElSalvador\fR .TP \fCTQLocale::EquatorialGuinea\fR .TP \fCTQLocale::Eritrea\fR .TP \fCTQLocale::Estonia\fR .TP \fCTQLocale::Ethiopia\fR .TP \fCTQLocale::FalklandIslands\fR .TP \fCTQLocale::FaroeIslands\fR .TP \fCTQLocale::FijiCountry\fR .TP \fCTQLocale::Finland\fR .TP \fCTQLocale::France\fR .TP \fCTQLocale::MetropolitanFrance\fR .TP \fCTQLocale::FrenchGuiana\fR .TP \fCTQLocale::FrenchPolynesia\fR .TP \fCTQLocale::FrenchSouthernTerritories\fR .TP \fCTQLocale::Gabon\fR .TP \fCTQLocale::Gambia\fR .TP \fCTQLocale::Georgia\fR .TP \fCTQLocale::Germany\fR .TP \fCTQLocale::Ghana\fR .TP \fCTQLocale::Gibraltar\fR .TP \fCTQLocale::Greece\fR .TP \fCTQLocale::Greenland\fR .TP \fCTQLocale::Grenada\fR .TP \fCTQLocale::Guadeloupe\fR .TP \fCTQLocale::Guam\fR .TP \fCTQLocale::Guatemala\fR .TP \fCTQLocale::Guinea\fR .TP \fCTQLocale::GuineaBissau\fR .TP \fCTQLocale::Guyana\fR .TP \fCTQLocale::Haiti\fR .TP \fCTQLocale::HeardAndMcDonaldIslands\fR .TP \fCTQLocale::Honduras\fR .TP \fCTQLocale::HongKong\fR .TP \fCTQLocale::Hungary\fR .TP \fCTQLocale::Iceland\fR .TP \fCTQLocale::India\fR .TP \fCTQLocale::Indonesia\fR .TP \fCTQLocale::Iran\fR .TP \fCTQLocale::Iraq\fR .TP \fCTQLocale::Ireland\fR .TP \fCTQLocale::Israel\fR .TP \fCTQLocale::Italy\fR .TP \fCTQLocale::Jamaica\fR .TP \fCTQLocale::Japan\fR .TP \fCTQLocale::Jordan\fR .TP \fCTQLocale::Kazakhstan\fR .TP \fCTQLocale::Kenya\fR .TP \fCTQLocale::Kiribati\fR .TP \fCTQLocale::DemocraticRepublicOfKorea\fR .TP \fCTQLocale::RepublicOfKorea\fR .TP \fCTQLocale::Kuwait\fR .TP \fCTQLocale::Kyrgyzstan\fR .TP \fCTQLocale::Lao\fR .TP \fCTQLocale::Latvia\fR .TP \fCTQLocale::Lebanon\fR .TP \fCTQLocale::Lesotho\fR .TP \fCTQLocale::Liberia\fR .TP \fCTQLocale::LibyanArabJamahiriya\fR .TP \fCTQLocale::Liechtenstein\fR .TP \fCTQLocale::Lithuania\fR .TP \fCTQLocale::Luxembourg\fR .TP \fCTQLocale::Macau\fR .TP \fCTQLocale::Macedonia\fR .TP \fCTQLocale::Madagascar\fR .TP \fCTQLocale::Malawi\fR .TP \fCTQLocale::Malaysia\fR .TP \fCTQLocale::Maldives\fR .TP \fCTQLocale::Mali\fR .TP \fCTQLocale::Malta\fR .TP \fCTQLocale::MarshallIslands\fR .TP \fCTQLocale::Martinique\fR .TP \fCTQLocale::Mauritania\fR .TP \fCTQLocale::Mauritius\fR .TP \fCTQLocale::Mayotte\fR .TP \fCTQLocale::Mexico\fR .TP \fCTQLocale::Micronesia\fR .TP \fCTQLocale::Moldova\fR .TP \fCTQLocale::Monaco\fR .TP \fCTQLocale::Mongolia\fR .TP \fCTQLocale::Montserrat\fR .TP \fCTQLocale::Morocco\fR .TP \fCTQLocale::Mozambique\fR .TP \fCTQLocale::Myanmar\fR .TP \fCTQLocale::Namibia\fR .TP \fCTQLocale::NauruCountry\fR .TP \fCTQLocale::Nepal\fR .TP \fCTQLocale::Netherlands\fR .TP \fCTQLocale::NetherlandsAntilles\fR .TP \fCTQLocale::NewCaledonia\fR .TP \fCTQLocale::NewZealand\fR .TP \fCTQLocale::Nicaragua\fR .TP \fCTQLocale::Niger\fR .TP \fCTQLocale::Nigeria\fR .TP \fCTQLocale::Niue\fR .TP \fCTQLocale::NorfolkIsland\fR .TP \fCTQLocale::NorthernMarianaIslands\fR .TP \fCTQLocale::Norway\fR .TP \fCTQLocale::Oman\fR .TP \fCTQLocale::Pakistan\fR .TP \fCTQLocale::Palau\fR .TP \fCTQLocale::PalestinianTerritory\fR .TP \fCTQLocale::Panama\fR .TP \fCTQLocale::PapuaNewGuinea\fR .TP \fCTQLocale::Paraguay\fR .TP \fCTQLocale::Peru\fR .TP \fCTQLocale::Philippines\fR .TP \fCTQLocale::Pitcairn\fR .TP \fCTQLocale::Poland\fR .TP \fCTQLocale::Portugal\fR .TP \fCTQLocale::PuertoRico\fR .TP \fCTQLocale::Qatar\fR .TP \fCTQLocale::Reunion\fR .TP \fCTQLocale::Romania\fR .TP \fCTQLocale::RussianFederation\fR .TP \fCTQLocale::Rwanda\fR .TP \fCTQLocale::SaintKittsAndNevis\fR .TP \fCTQLocale::StLucia\fR .TP \fCTQLocale::StVincentAndTheGrenadines\fR .TP \fCTQLocale::Samoa\fR .TP \fCTQLocale::SanMarino\fR .TP \fCTQLocale::SaoTomeAndPrincipe\fR .TP \fCTQLocale::SaudiArabia\fR .TP \fCTQLocale::Senegal\fR .TP \fCTQLocale::Seychelles\fR .TP \fCTQLocale::SierraLeone\fR .TP \fCTQLocale::Singapore\fR .TP \fCTQLocale::Slovakia\fR .TP \fCTQLocale::Slovenia\fR .TP \fCTQLocale::SolomonIslands\fR .TP \fCTQLocale::Somalia\fR .TP \fCTQLocale::SouthAfrica\fR .TP \fCTQLocale::SouthGeorgiaAndTheSouthSandwichIslands\fR .TP \fCTQLocale::Spain\fR .TP \fCTQLocale::SriLanka\fR .TP \fCTQLocale::StHelena\fR .TP \fCTQLocale::StPierreAndMiquelon\fR .TP \fCTQLocale::Sudan\fR .TP \fCTQLocale::Suriname\fR .TP \fCTQLocale::SvalbardAndJanMayenIslands\fR .TP \fCTQLocale::Swaziland\fR .TP \fCTQLocale::Sweden\fR .TP \fCTQLocale::Switzerland\fR .TP \fCTQLocale::SyrianArabRepublic\fR .TP \fCTQLocale::Taiwan\fR .TP \fCTQLocale::Tajikistan\fR .TP \fCTQLocale::Tanzania\fR .TP \fCTQLocale::Thailand\fR .TP \fCTQLocale::Togo\fR .TP \fCTQLocale::Tokelau\fR .TP \fCTQLocale::TongaCountry\fR .TP \fCTQLocale::TrinidadAndTobago\fR .TP \fCTQLocale::Tunisia\fR .TP \fCTQLocale::Turkey\fR .TP \fCTQLocale::Turkmenistan\fR .TP \fCTQLocale::TurksAndCaicosIslands\fR .TP \fCTQLocale::Tuvalu\fR .TP \fCTQLocale::Uganda\fR .TP \fCTQLocale::Ukraine\fR .TP \fCTQLocale::UnitedArabEmirates\fR .TP \fCTQLocale::UnitedKingdom\fR .TP \fCTQLocale::UnitedStates\fR .TP \fCTQLocale::UnitedStatesMinorOutlyingIslands\fR .TP \fCTQLocale::Uruguay\fR .TP \fCTQLocale::Uzbekistan\fR .TP \fCTQLocale::Vanuatu\fR .TP \fCTQLocale::VaticanCityState\fR .TP \fCTQLocale::Venezuela\fR .TP \fCTQLocale::VietNam\fR .TP \fCTQLocale::BritishVirginIslands\fR .TP \fCTQLocale::USVirginIslands\fR .TP \fCTQLocale::WallisAndFutunaIslands\fR .TP \fCTQLocale::WesternSahara\fR .TP \fCTQLocale::Yemen\fR .TP \fCTQLocale::Yugoslavia\fR .TP \fCTQLocale::Zambia\fR .TP \fCTQLocale::Zimbabwe\fR .SH "TQLocale::Language" This enumerated type is used to specify a language. .TP \fCTQLocale::C\fR - Identical to English/UnitedStates .TP \fCTQLocale::Abkhazian\fR .TP \fCTQLocale::Afan\fR .TP \fCTQLocale::Afar\fR .TP \fCTQLocale::Afrikaans\fR .TP \fCTQLocale::Albanian\fR .TP \fCTQLocale::Amharic\fR .TP \fCTQLocale::Arabic\fR .TP \fCTQLocale::Armenian\fR .TP \fCTQLocale::Assamese\fR .TP \fCTQLocale::Aymara\fR .TP \fCTQLocale::Azerbaijani\fR .TP \fCTQLocale::Bashkir\fR .TP \fCTQLocale::Basque\fR .TP \fCTQLocale::Bengali\fR .TP \fCTQLocale::Bhutani\fR .TP \fCTQLocale::Bihari\fR .TP \fCTQLocale::Bislama\fR .TP \fCTQLocale::Breton\fR .TP \fCTQLocale::Bulgarian\fR .TP \fCTQLocale::Burmese\fR .TP \fCTQLocale::Byelorussian\fR .TP \fCTQLocale::Cambodian\fR .TP \fCTQLocale::Catalan\fR .TP \fCTQLocale::Chinese\fR .TP \fCTQLocale::Corsican\fR .TP \fCTQLocale::Croatian\fR .TP \fCTQLocale::Czech\fR .TP \fCTQLocale::Danish\fR .TP \fCTQLocale::Dutch\fR .TP \fCTQLocale::English\fR .TP \fCTQLocale::Esperanto\fR .TP \fCTQLocale::Estonian\fR .TP \fCTQLocale::Faroese\fR .TP \fCTQLocale::FijiLanguage\fR .TP \fCTQLocale::Finnish\fR .TP \fCTQLocale::French\fR .TP \fCTQLocale::Frisian\fR .TP \fCTQLocale::Gaelic\fR .TP \fCTQLocale::Galician\fR .TP \fCTQLocale::Georgian\fR .TP \fCTQLocale::German\fR .TP \fCTQLocale::Greek\fR .TP \fCTQLocale::Greenlandic\fR .TP \fCTQLocale::Guarani\fR .TP \fCTQLocale::Gujarati\fR .TP \fCTQLocale::Hausa\fR .TP \fCTQLocale::Hebrew\fR .TP \fCTQLocale::Hindi\fR .TP \fCTQLocale::Hungarian\fR .TP \fCTQLocale::Icelandic\fR .TP \fCTQLocale::Indonesian\fR .TP \fCTQLocale::Interlingua\fR .TP \fCTQLocale::Interlingue\fR .TP \fCTQLocale::Inuktitut\fR .TP \fCTQLocale::Inupiak\fR .TP \fCTQLocale::Irish\fR .TP \fCTQLocale::Italian\fR .TP \fCTQLocale::Japanese\fR .TP \fCTQLocale::Javanese\fR .TP \fCTQLocale::Kannada\fR .TP \fCTQLocale::Kashmiri\fR .TP \fCTQLocale::Kazakh\fR .TP \fCTQLocale::Kinyarwanda\fR .TP \fCTQLocale::Kirghiz\fR .TP \fCTQLocale::Korean\fR .TP \fCTQLocale::Kurdish\fR .TP \fCTQLocale::Kurundi\fR .TP \fCTQLocale::Laothian\fR .TP \fCTQLocale::Latin\fR .TP \fCTQLocale::Latvian\fR .TP \fCTQLocale::Lingala\fR .TP \fCTQLocale::Lithuanian\fR .TP \fCTQLocale::Macedonian\fR .TP \fCTQLocale::Malagasy\fR .TP \fCTQLocale::Malay\fR .TP \fCTQLocale::Malayalam\fR .TP \fCTQLocale::Maltese\fR .TP \fCTQLocale::Maori\fR .TP \fCTQLocale::Marathi\fR .TP \fCTQLocale::Moldavian\fR .TP \fCTQLocale::Mongolian\fR .TP \fCTQLocale::NauruLanguage\fR .TP \fCTQLocale::Nepali\fR .TP \fCTQLocale::Norwegian\fR .TP \fCTQLocale::Occitan\fR .TP \fCTQLocale::Oriya\fR .TP \fCTQLocale::Pashto\fR .TP \fCTQLocale::Persian\fR .TP \fCTQLocale::Polish\fR .TP \fCTQLocale::Portuguese\fR .TP \fCTQLocale::Punjabi\fR .TP \fCTQLocale::Quechua\fR .TP \fCTQLocale::RhaetoRomance\fR .TP \fCTQLocale::Romanian\fR .TP \fCTQLocale::Russian\fR .TP \fCTQLocale::Samoan\fR .TP \fCTQLocale::Sangho\fR .TP \fCTQLocale::Sanskrit\fR .TP \fCTQLocale::Serbian\fR .TP \fCTQLocale::SerboCroatian\fR .TP \fCTQLocale::Sesotho\fR .TP \fCTQLocale::Setswana\fR .TP \fCTQLocale::Shona\fR .TP \fCTQLocale::Sindhi\fR .TP \fCTQLocale::Singhalese\fR .TP \fCTQLocale::Siswati\fR .TP \fCTQLocale::Slovak\fR .TP \fCTQLocale::Slovenian\fR .TP \fCTQLocale::Somali\fR .TP \fCTQLocale::Spanish\fR .TP \fCTQLocale::Sundanese\fR .TP \fCTQLocale::Swahili\fR .TP \fCTQLocale::Swedish\fR .TP \fCTQLocale::Tagalog\fR .TP \fCTQLocale::Tajik\fR .TP \fCTQLocale::Tamil\fR .TP \fCTQLocale::Tatar\fR .TP \fCTQLocale::Telugu\fR .TP \fCTQLocale::Thai\fR .TP \fCTQLocale::Tibetan\fR .TP \fCTQLocale::Tigrinya\fR .TP \fCTQLocale::TongaLanguage\fR .TP \fCTQLocale::Tsonga\fR .TP \fCTQLocale::Turkish\fR .TP \fCTQLocale::Turkmen\fR .TP \fCTQLocale::Twi\fR .TP \fCTQLocale::Uigur\fR .TP \fCTQLocale::Ukrainian\fR .TP \fCTQLocale::Urdu\fR .TP \fCTQLocale::Uzbek\fR .TP \fCTQLocale::Vietnamese\fR .TP \fCTQLocale::Volapuk\fR .TP \fCTQLocale::Welsh\fR .TP \fCTQLocale::Wolof\fR .TP \fCTQLocale::Xhosa\fR .TP \fCTQLocale::Yiddish\fR .TP \fCTQLocale::Yoruba\fR .TP \fCTQLocale::Zhuang\fR .TP \fCTQLocale::Zulu\fR .SH MEMBER FUNCTION DOCUMENTATION .SH "TQLocale::TQLocale ()" Constructs a TQLocale object initialized with the default locale. .PP See also setDefault(). .SH "TQLocale::TQLocale ( const TQString & name )" Constructs a TQLocale 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 TQLocale(Country, Language). .PP This constructor is much slower than TQLocale(Country, Language). .PP See also name(). .SH "TQLocale::TQLocale ( Language language, Country country = AnyCountry )" Constructs a TQLocale 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, TQLocale 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 "TQLocale::TQLocale ( const TQLocale & other )" Constructs a TQLocale object as a copy of \fIother\fR. .SH "TQLocale TQLocale::c ()\fC [static]\fR" Returns a TQLocale object initialized to the "C" locale. .PP See also system(). .SH "Country TQLocale::country () const" Returns the country of this locale. .PP See also TQLocale(). .SH "TQString TQLocale::countryToString ( Country country )\fC [static]\fR" Returns a TQString containing the name of \fIcountry\fR. .SH "Language TQLocale::language () const" Returns the language of this locale. .PP See also TQLocale(). .SH "TQString TQLocale::languageToString ( Language language )\fC [static]\fR" Returns a TQString containing the name of \fIlanguage\fR. .SH "TQString TQLocale::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 TQLocale(). .SH "TQLocale & TQLocale::operator= ( const TQLocale & other )" Assigns \fIother\fR to this TQLocale object and returns a reference to this TQLocale object. .SH "void TQLocale::setDefault ( const TQLocale & locale )\fC [static]\fR" \fBWarning:\fR This function is \fInot\fR reentrant.

.PP Sets the global default locale to \fIlocale\fR. These values are used when a TQLocale 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 "TQLocale TQLocale::system ()\fC [static]\fR" Returns a TQLocale object initialized to the system locale. .SH "double TQLocale::toDouble ( const TQString & 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 TQString::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 TQLocale c(TQLocale::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 TQLocale german(TQLocale::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 TQString::toDouble(). .SH "float TQLocale::toFloat ( const TQString & 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 TQLocale::toInt ( const TQString & 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 TQLocale::toLong ( const TQString & 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 TQLocale::toLongLong ( const TQString & 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 TQLocale::toShort ( const TQString & 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 "TQString TQLocale::toString ( TQ_LLONG i ) const" Returns a localized string representation of \fIi\fR. .PP See also toLongLong(). .SH "TQString TQLocale::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 "TQString TQLocale::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 "TQString TQLocale::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 "TQString TQLocale::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 "TQString TQLocale::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 "TQString TQLocale::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 "TQString TQLocale::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 "TQString TQLocale::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 TQString::number(double, char, int). .PP See also toDouble(). .SH "TQString TQLocale::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 TQString::number(double, char, int). .PP See also toDouble(). .SH "uint TQLocale::toUInt ( const TQString & 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 TQLocale::toULong ( const TQString & 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 TQLocale::toULongLong ( const TQString & 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 TQLocale::toUShort ( const TQString & 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/tqlocale.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).