.TH "KLocale" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KLocale \- KLocale provides support for country specific stuff like the national language. class for supporting locale settings and national language.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <klocale.h>\fP
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBSignPosition\fP { \fBParensAround\fP =  0, \fBBeforeQuantityMoney\fP =  1, \fBAfterQuantityMoney\fP =  2, \fBBeforeMoney\fP =  3, \fBAfterMoney\fP =  4 }"
.br
.ti -1c
.RI "enum \fBReadDateFlags\fP { \fBNormalFormat\fP =  1, \fBShortFormat\fP =  2 }"
.br
.ti -1c
.RI "enum \fBReadTimeFlags\fP { \fBWithSeconds\fP =  0, \fBWithoutSeconds\fP =  1 }"
.br
.ti -1c
.RI "enum \fBMeasureSystem\fP { \fBMetric\fP, \fBImperial\fP }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKLocale\fP (const \fBQString\fP &catalog, \fBKConfig\fP *config=0)"
.br
.ti -1c
.RI "\fBKLocale\fP (const \fBKLocale\fP &rhs)"
.br
.ti -1c
.RI "\fBKLocale\fP & \fBoperator=\fP (const \fBKLocale\fP &rhs)"
.br
.ti -1c
.RI "\fB~KLocale\fP ()"
.br
.ti -1c
.RI "\fBQString\fP \fBtranslate\fP (const char *index) const "
.br
.ti -1c
.RI "\fBQString\fP \fBtranslate\fP (const char *comment, const char *fallback) const "
.br
.ti -1c
.RI "\fBQString\fP \fBtranslate\fP (const char *singular, const char *plural, unsigned long n) const "
.br
.ti -1c
.RI "bool \fBsetEncoding\fP (int mibEnum)"
.br
.ti -1c
.RI "bool \fBsetLanguage\fP (const \fBQString\fP &language)"
.br
.ti -1c
.RI "bool \fBsetLanguage\fP (const \fBQStringList\fP &languages)"
.br
.ti -1c
.RI "bool \fBsetCountry\fP (const \fBQString\fP &country)"
.br
.ti -1c
.RI "\fBQString\fP \fBdecimalSymbol\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBthousandsSeparator\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBcurrencySymbol\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBmonetaryDecimalSymbol\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBmonetaryThousandsSeparator\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBpositiveSign\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBnegativeSign\fP () const "
.br
.ti -1c
.RI "int \fBfracDigits\fP () const "
.br
.ti -1c
.RI "bool \fBpositivePrefixCurrencySymbol\fP () const "
.br
.ti -1c
.RI "bool \fBnegativePrefixCurrencySymbol\fP () const "
.br
.ti -1c
.RI "\fBSignPosition\fP \fBpositiveMonetarySignPosition\fP () const "
.br
.ti -1c
.RI "\fBSignPosition\fP \fBnegativeMonetarySignPosition\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBformatMoney\fP (double num, const \fBQString\fP &currency=QString::null, int digits=-1) const "
.br
.ti -1c
.RI "\fBQString\fP \fBformatNumber\fP (double num, int precision=-1) const "
.br
.ti -1c
.RI "\fBQString\fP \fBformatLong\fP (long num) const "
.br
.ti -1c
.RI "bool \fBnounDeclension\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBformatDate\fP (const \fBQDate\fP &pDate, bool shortFormat=false) const "
.br
.ti -1c
.RI "bool \fBdateMonthNamePossessive\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBformatTime\fP (const \fBQTime\fP &pTime, bool includeSecs, bool isDuration) const "
.br
.ti -1c
.RI "\fBQString\fP \fBformatTime\fP (const \fBQTime\fP &pTime, bool includeSecs=false) const "
.br
.ti -1c
.RI "bool \fBuse12Clock\fP () const "
.br
.ti -1c
.RI "bool \fBweekStartsMonday\fP () const KDE_DEPRECATED"
.br
.ti -1c
.RI "int \fBweekStartDay\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBmonthName\fP (int i, bool shortName=false) const KDE_DEPRECATED"
.br
.ti -1c
.RI "\fBQString\fP \fBmonthNamePossessive\fP (int i, bool shortName=false) const KDE_DEPRECATED"
.br
.ti -1c
.RI "\fBQString\fP \fBweekDayName\fP (int i, bool shortName=false) const KDE_DEPRECATED"
.br
.ti -1c
.RI "const \fBKCalendarSystem\fP * \fBcalendar\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBcalendarType\fP () const "
.br
.ti -1c
.RI "void \fBsetCalendar\fP (const \fBQString\fP &calendarType)"
.br
.ti -1c
.RI "\fBQString\fP \fBformatDateTime\fP (const \fBQDateTime\fP &pDateTime, bool shortFormat=true, bool includeSecs=false) const "
.br
.ti -1c
.RI "double \fBreadMoney\fP (const \fBQString\fP &numStr, bool *ok=0) const "
.br
.ti -1c
.RI "double \fBreadNumber\fP (const \fBQString\fP &numStr, bool *ok=0) const "
.br
.ti -1c
.RI "\fBQDate\fP \fBreadDate\fP (const \fBQString\fP &str, bool *ok=0) const "
.br
.ti -1c
.RI "\fBQDate\fP \fBreadDate\fP (const \fBQString\fP &intstr, const \fBQString\fP &fmt, bool *ok=0) const "
.br
.ti -1c
.RI "\fBQDate\fP \fBreadDate\fP (const \fBQString\fP &str, ReadDateFlags flags, bool *ok=0) const "
.br
.ti -1c
.RI "\fBQTime\fP \fBreadTime\fP (const \fBQString\fP &str, bool *ok=0) const "
.br
.ti -1c
.RI "\fBQTime\fP \fBreadTime\fP (const \fBQString\fP &str, ReadTimeFlags flags, bool *ok=0) const "
.br
.ti -1c
.RI "\fBQString\fP \fBlanguage\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBcountry\fP () const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBlanguagesTwoAlpha\fP () const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBlanguageList\fP () const "
.br
.ti -1c
.RI "const char * \fBencoding\fP () const "
.br
.ti -1c
.RI "int \fBencodingMib\fP () const "
.br
.ti -1c
.RI "\fBQTextCodec\fP * \fBcodecForEncoding\fP () const "
.br
.ti -1c
.RI "int \fBfileEncodingMib\fP () const "
.br
.ti -1c
.RI "void \fBsetDateFormat\fP (const \fBQString\fP &format)"
.br
.ti -1c
.RI "void \fBsetDateFormatShort\fP (const \fBQString\fP &format)"
.br
.ti -1c
.RI "void \fBsetDateMonthNamePossessive\fP (bool possessive)"
.br
.ti -1c
.RI "void \fBsetTimeFormat\fP (const \fBQString\fP &format)"
.br
.ti -1c
.RI "void \fBsetWeekStartsMonday\fP (bool start) KDE_DEPRECATED"
.br
.ti -1c
.RI "void \fBsetWeekStartDay\fP (int day)"
.br
.ti -1c
.RI "\fBQString\fP \fBdateFormat\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBdateFormatShort\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBtimeFormat\fP () const "
.br
.ti -1c
.RI "void \fBsetDecimalSymbol\fP (const \fBQString\fP &symbol)"
.br
.ti -1c
.RI "void \fBsetThousandsSeparator\fP (const \fBQString\fP &separator)"
.br
.ti -1c
.RI "void \fBsetPositiveSign\fP (const \fBQString\fP &sign)"
.br
.ti -1c
.RI "void \fBsetNegativeSign\fP (const \fBQString\fP &sign)"
.br
.ti -1c
.RI "void \fBsetPositiveMonetarySignPosition\fP (\fBSignPosition\fP signpos)"
.br
.ti -1c
.RI "void \fBsetNegativeMonetarySignPosition\fP (\fBSignPosition\fP signpos)"
.br
.ti -1c
.RI "void \fBsetPositivePrefixCurrencySymbol\fP (bool prefix)"
.br
.ti -1c
.RI "void \fBsetNegativePrefixCurrencySymbol\fP (bool prefix)"
.br
.ti -1c
.RI "void \fBsetFracDigits\fP (int digits)"
.br
.ti -1c
.RI "void \fBsetMonetaryThousandsSeparator\fP (const \fBQString\fP &separator)"
.br
.ti -1c
.RI "void \fBsetMonetaryDecimalSymbol\fP (const \fBQString\fP &symbol)"
.br
.ti -1c
.RI "void \fBsetCurrencySymbol\fP (const \fBQString\fP &symbol)"
.br
.ti -1c
.RI "int \fBpageSize\fP () const "
.br
.ti -1c
.RI "void \fBsetPageSize\fP (int paperFormat)"
.br
.ti -1c
.RI "\fBMeasureSystem\fP \fBmeasureSystem\fP () const "
.br
.ti -1c
.RI "void \fBsetMeasureSystem\fP (\fBMeasureSystem\fP value)"
.br
.ti -1c
.RI "void \fBinsertCatalogue\fP (const \fBQString\fP &catalog)"
.br
.ti -1c
.RI "void \fBremoveCatalogue\fP (const \fBQString\fP &catalog)"
.br
.ti -1c
.RI "void \fBsetActiveCatalogue\fP (const \fBQString\fP &catalog)"
.br
.ti -1c
.RI "\fBQString\fP \fBtranslateQt\fP (const char *context, const char *sourceText, const char *message) const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBallLanguagesTwoAlpha\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBtwoAlphaToLanguageName\fP (const \fBQString\fP &code) const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBallCountriesTwoAlpha\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBtwoAlphaToCountryName\fP (const \fBQString\fP &code) const "
.br
.ti -1c
.RI "\fBQString\fP \fBformatMoney\fP (const \fBQString\fP &numStr) const KDE_DEPRECATED"
.br
.ti -1c
.RI "\fBQString\fP \fBformatNumber\fP (const \fBQString\fP &numStr) const KDE_DEPRECATED"
.br
.ti -1c
.RI "\fBQString\fP \fBlanguages\fP () const KDE_DEPRECATED"
.br
.ti -1c
.RI "bool \fBsetCharset\fP (const \fBQString\fP &charset) KDE_DEPRECATED"
.br
.ti -1c
.RI "\fBQString\fP \fBcharset\fP () const KDE_DEPRECATED"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void \fBsplitLocale\fP (const \fBQString\fP &str, \fBQString\fP &language, \fBQString\fP &country, \fBQString\fP &charset)"
.br
.ti -1c
.RI "static void \fBsetMainCatalogue\fP (const char *catalog)"
.br
.ti -1c
.RI "static \fBQString\fP \fBlangLookup\fP (const \fBQString\fP &fname, const char *rtype='html')"
.br
.ti -1c
.RI "static \fBQString\fP \fBdefaultLanguage\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBdefaultCountry\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fB_initLanguage\fP (\fBKConfigBase\fP *config)"
.br
.in -1c
.SS "Static Protected Member Functions"

.in +1c
.ti -1c
.RI "static void \fBinitInstance\fP ()"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKGlobal\fP"
.br
.in -1c
.SS "Related Functions"
(Note that these are not member functions.) 
.in +1c
.ti -1c
.RI "\fBI18N_NOOP\fP(x)"
.br
.ti -1c
.RI "\fBI18N_NOOP2\fP(comment, x)"
.br
.ti -1c
.RI "KDECORE_EXPORT \fBQString\fP \fBi18n\fP (const char *text)"
.br
.ti -1c
.RI "KDECORE_EXPORT \fBQString\fP \fBi18n\fP (const char *comment, const char *text)"
.br
.ti -1c
.RI "KDECORE_EXPORT \fBQString\fP \fBi18n\fP (const char *singular, const char *plural, unsigned long n)"
.br
.ti -1c
.RI "\fBQString\fP \fBtr2i18n\fP (const char *message, const char *=0)"
.br
.in -1c
.SH "Detailed Description"
.PP 
KLocale provides support for country specific stuff like the national language. class for supporting locale settings and national language. 

KLocale supports translating, as well as specifying the format for numbers, currency, time, and date.
.PP
\fBAuthor:\fP
.RS 4
Stephan Kulow <coolo@kde.org>, Preston Brown <pbrown@kde.org>, Hans Petter Bieker <bieker@kde.org>, Lukas Tinkl <lukas.tinkl@suse.cz> 
.RE
.PP

.PP
Definition at line 119 of file klocale.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKLocale::SignPosition\fP"
.PP
Various positions for where to place the positive or negative sign when they are related to a monetary value. 
.PP
Definition at line 262 of file klocale.h.
.SS "enum \fBKLocale::MeasureSystem\fP"
.PP
The Metric system will give you information in mm, while the Imperial system will give you information in inches. 
.PP
Definition at line 977 of file klocale.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KLocale::KLocale (const \fBQString\fP & catalog, \fBKConfig\fP * config = \fC0\fP)"
.PP
Constructs a KLocale with the given catalog name. 
.PP
The constructor looks for an entry Locale/Language in the configuration file. If no config file is specified, it will also look for languages using the environment variables (KDE_LANG, LC_MESSAGES, LC_ALL, LANG), as well as the global configuration file. If KLocale is not able to use any of the specified languages, the default language (en_US) will be used.
.PP
If you specify a configuration file, it has to be valid until the KLocale object is destroyed.
.PP
\fBParameters:\fP
.RS 4
\fIcatalog\fP The name of the main language file 
.br
\fIconfig\fP The configuration file to use. 
.RE
.PP

.PP
Definition at line 76 of file klocale.cpp.
.PP
References KInstance::config(), KGlobal::instance(), and languages().
.SS "KLocale::KLocale (const \fBKLocale\fP & rhs)"
.PP
Copy constructor. 
.PP
Definition at line 2261 of file klocale.cpp.
.SS "KLocale::~\fBKLocale\fP ()"
.PP
Destructor. 
.PP
Definition at line 689 of file klocale.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBKLocale\fP & KLocale::operator= (const \fBKLocale\fP & rhs)"
.PP
Assignment operator. 
.PP
Definition at line 2268 of file klocale.cpp.
.PP
References QString::d().
.SS "\fBQString\fP KLocale::translate (const char * index) const"
.PP
Translates the string into the corresponding string in the national language, if available. 
.PP
If not, returns the string itself. There is a \fBKDE\fP wide message file that contains the most often used phrases, so we can avoid duplicating the translation of these phrases. If a phrase is not found in the catalog given to the constructor, it will search in the system catalog. This makes it possible to override some phrases for your needs.
.PP
The argument must be an UTF-8 encoded string (If you only use characters that are in US-ASCII you're on the safe side. But for e.g. german umlauts or french accents should be recoded to UTF-8)
.PP
\fBParameters:\fP
.RS 4
\fIindex\fP The lookup text and default text, if not found. 
.RE
.PP

.PP
Definition at line 746 of file klocale.cpp.
.PP
Referenced by formatDateTime(), formatTime(), monthName(), KCalendarSystemJalali::monthName(), monthNamePossessive(), readTime(), KCalendarSystemJalali::weekDayName(), and KCalendarSystem::weekDayName().
.SS "\fBQString\fP KLocale::translate (const char * comment, const char * fallback) const"
.PP
Translates the string into the corresponding string in the national language, if available. 
.PP
The real contents of the string is in the argument fallback, but the meaning of it is coded into the argument index. In some cases you'll need this function, when english is too ambiguous to express it.
.PP
Most of the times the translators will tell you if it can't be translated as it, but think of cases as 'New', where the translations differs depending on what is New. Or simple cases as 'Open', that can be used to express something is open or it can be used to express that you want something to open... There are tons of such examples.
.PP
If translate('Open') is not enough to translate it well, use translate('To Open', 'Open') or translate('Is Open', 'Open'). The english user will see 'Open' in both cases, but the translated version may vary. Of course you can also use \fBi18n()\fP
.PP
\fBParameters:\fP
.RS 4
\fIcomment\fP the comment. The lookup text is made out of comment + \fCfallback\fP 
.br
\fIfallback\fP the default text, if not found 
.RE
.PP
\fBReturns:\fP
.RS 4
translation 
.RE
.PP

.PP
Definition at line 751 of file klocale.cpp.
.PP
References endl(), and QString::fromUtf8().
.SS "\fBQString\fP KLocale::translate (const char * singular, const char * plural, unsigned long n) const"
.PP
Used to get the correct, translated singular or plural of a word. 
.PP
\fBParameters:\fP
.RS 4
\fIsingular\fP the singular form of the word, for example 'file'. 
.br
\fIplural\fP the plural form of the word. Must contain a '%n' that will be replaced by the number \fCn\fP, for example '%n files' 
.br
\fIn\fP the number 
.RE
.PP
\fBReturns:\fP
.RS 4
the correct singular or plural for the selected language, depending on n 
.RE
.PP

.PP
Definition at line 787 of file klocale.cpp.
.PP
References endl(), QString::find(), QString::fromUtf8(), QString::isEmpty(), and QStringList::split().
.SS "bool KLocale::setEncoding (int mibEnum)"
.PP
Changes the current encoding. 
.PP
\fBParameters:\fP
.RS 4
\fImibEnum\fP The mib of the preferred codec
.RE
.PP
\fBReturns:\fP
.RS 4
True on success. 
.RE
.PP

.PP
Definition at line 2142 of file klocale.cpp.
.PP
References QTextCodec::codecForMib().
.SS "bool KLocale::setLanguage (const \fBQString\fP & language)"
.PP
Changes the current language. 
.PP
The current language will be left unchanged if failed. It will force a reload of the country specific configuration as well.
.PP
\fBParameters:\fP
.RS 4
\fIlanguage\fP The language code.
.RE
.PP
\fBReturns:\fP
.RS 4
True on success. 
.RE
.PP

.PP
Definition at line 398 of file klocale.cpp.
.PP
References language(), QString::prepend(), and QString::remove().
.SS "bool KLocale::setLanguage (const \fBQStringList\fP & languages)"
.PP
Changes the list of prefed languages for the locale. 
.PP
The first valid language in the list will be used, or the default (en_US) language will be used if non of the specified languages were available.
.PP
\fBParameters:\fP
.RS 4
\fIlanguages\fP The list of language codes.
.RE
.PP
\fBReturns:\fP
.RS 4
True if one of the specified languages were used. 
.RE
.PP

.PP
Definition at line 416 of file klocale.cpp.
.PP
References defaultLanguage(), languageList(), and languages().
.SS "bool KLocale::setCountry (const \fBQString\fP & country)"
.PP
Changes the current country. 
.PP
The current country will be left unchanged if failed. It will force a reload of the country specific configuration.
.PP
\fBParameters:\fP
.RS 4
\fIcountry\fP The ISO 3166 country code.
.RE
.PP
\fBReturns:\fP
.RS 4
True on success. 
.RE
.PP

.PP
Definition at line 375 of file klocale.cpp.
.SS "\fBQString\fP KLocale::decimalSymbol () const"
.PP
Returns what a decimal point should look like ('.' or ',' etc.) according to the current locale or user settings. 
.PP
\fBReturns:\fP
.RS 4
The decimal symbol used by locale. 
.RE
.PP

.PP
Definition at line 1015 of file klocale.cpp.
.PP
Referenced by formatNumber(), and readNumber().
.SS "\fBQString\fP KLocale::thousandsSeparator () const"
.PP
Returns what the thousands separator should look like (',' or '.' etc.) according to the current locale or user settings. 
.PP
\fBReturns:\fP
.RS 4
The thousands separator used by locale. 
.RE
.PP

.PP
Definition at line 1021 of file klocale.cpp.
.PP
Referenced by formatNumber(), and readNumber().
.SS "\fBQString\fP KLocale::currencySymbol () const"
.PP
Returns what the symbol denoting currency in the current locale as as defined by user settings should look like. 
.PP
\fBReturns:\fP
.RS 4
The default currency symbol used by locale. 
.RE
.PP

.PP
Definition at line 1027 of file klocale.cpp.
.PP
Referenced by formatMoney(), and readMoney().
.SS "\fBQString\fP KLocale::monetaryDecimalSymbol () const"
.PP
Returns what a decimal point should look like ('.' or ',' etc.) for monetary values, according to the current locale or user settings. 
.PP
\fBReturns:\fP
.RS 4
The monetary decimal symbol used by locale. 
.RE
.PP

.PP
Definition at line 1033 of file klocale.cpp.
.PP
Referenced by formatMoney(), and readMoney().
.SS "\fBQString\fP KLocale::monetaryThousandsSeparator () const"
.PP
Returns what a thousands separator for monetary values should look like (',' or ' ' etc.) according to the current locale or user settings. 
.PP
\fBReturns:\fP
.RS 4
The monetary thousands separator used by locale. 
.RE
.PP

.PP
Definition at line 1039 of file klocale.cpp.
.PP
Referenced by formatMoney(), and readMoney().
.SS "\fBQString\fP KLocale::positiveSign () const"
.PP
Returns what a positive sign should look like ('+', ' ', etc.) according to the current locale or user settings. 
.PP
\fBReturns:\fP
.RS 4
The positive sign used by locale. 
.RE
.PP

.PP
Definition at line 1045 of file klocale.cpp.
.PP
Referenced by formatMoney(), and formatNumber().
.SS "\fBQString\fP KLocale::negativeSign () const"
.PP
Returns what a negative sign should look like ('-', etc.) according to the current locale or user settings. 
.PP
\fBReturns:\fP
.RS 4
The negative sign used by locale. 
.RE
.PP

.PP
Definition at line 1051 of file klocale.cpp.
.PP
Referenced by formatMoney(), formatNumber(), readMoney(), and readNumber().
.SS "int KLocale::fracDigits () const"
.PP
The number of fractional digits to include in numeric/monetary values (usually 2). 
.PP
\fBReturns:\fP
.RS 4
Default number of fractional digits used by locale. 
.RE
.PP

.PP
Definition at line 1057 of file klocale.cpp.
.PP
Referenced by formatMoney().
.SS "bool KLocale::positivePrefixCurrencySymbol () const"
.PP
If and only if the currency symbol precedes a positive value, this will be true. 
.PP
\fBReturns:\fP
.RS 4
Where to print the currency symbol for positive numbers. 
.RE
.PP

.PP
Definition at line 1063 of file klocale.cpp.
.PP
Referenced by formatMoney().
.SS "bool KLocale::negativePrefixCurrencySymbol () const"
.PP
If and only if the currency symbol precedes a negative value, this will be true. 
.PP
\fBReturns:\fP
.RS 4
True if the currency symbol precedes negative numbers. 
.RE
.PP

.PP
Definition at line 1069 of file klocale.cpp.
.PP
Referenced by formatMoney().
.SS "\fBKLocale::SignPosition\fP KLocale::positiveMonetarySignPosition () const"
.PP
Returns the position of a positive sign in relation to a monetary value. 
.PP
\fBReturns:\fP
.RS 4
Where/how to print the positive sign. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBSignPosition\fP 
.RE
.PP

.PP
Definition at line 1075 of file klocale.cpp.
.PP
Referenced by formatMoney().
.SS "\fBKLocale::SignPosition\fP KLocale::negativeMonetarySignPosition () const"
.PP
Denotes where to place a negative sign in relation to a monetary value. 
.PP
\fBReturns:\fP
.RS 4
Where/how to print the negative sign. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBSignPosition\fP 
.RE
.PP

.PP
Definition at line 1081 of file klocale.cpp.
.PP
Referenced by formatMoney(), and readMoney().
.SS "\fBQString\fP KLocale::formatMoney (double num, const \fBQString\fP & currency = \fCQString::null\fP, int digits = \fC-1\fP) const"
.PP
Given a double, converts that to a numeric string containing the localized monetary equivalent. 
.PP
e.g. given 123456, return '$ 123,456.00'.
.PP
\fBParameters:\fP
.RS 4
\fInum\fP The number we want to format 
.br
\fIcurrency\fP The currency symbol you want. 
.br
\fIdigits\fP Number of fractional digits, or -1 for the default value
.RE
.PP
\fBReturns:\fP
.RS 4
The number of money as a localized string 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBfracDigits()\fP 
.RE
.PP

.PP
Definition at line 1099 of file klocale.cpp.
.PP
References QString::append(), currencySymbol(), QString::find(), fracDigits(), QString::insert(), QString::isNull(), QString::length(), monetaryDecimalSymbol(), monetaryThousandsSeparator(), negativeMonetarySignPosition(), negativePrefixCurrencySymbol(), negativeSign(), QString::number(), positiveMonetarySignPosition(), positivePrefixCurrencySymbol(), positiveSign(), QString::prepend(), and QString::replace().
.PP
Referenced by formatMoney().
.SS "\fBQString\fP KLocale::formatNumber (double num, int precision = \fC-1\fP) const"
.PP
Given a double, converts that to a numeric string containing the localized numeric equivalent. 
.PP
e.g. given 123456.78F, return '123,456.78' (for some European country). If precision isn't specified, 2 is used.
.PP
\fBParameters:\fP
.RS 4
\fInum\fP The number to convert 
.br
\fIprecision\fP Number of fractional digits used.
.RE
.PP
\fBReturns:\fP
.RS 4
The number as a localized string 
.RE
.PP

.PP
Definition at line 1165 of file klocale.cpp.
.PP
References decimalSymbol(), QString::find(), QString::insert(), QString::length(), negativeSign(), QString::number(), positiveSign(), QString::prepend(), QString::replace(), and thousandsSeparator().
.PP
Referenced by formatLong(), and formatNumber().
.SS "\fBQString\fP KLocale::formatLong (long num) const"
.PP
Given an integer, converts that to a numeric string containing the localized numeric equivalent. 
.PP
e.g. given 123456L, return '123,456' (for some European country).
.PP
\fBParameters:\fP
.RS 4
\fInum\fP The number to convert
.RE
.PP
\fBReturns:\fP
.RS 4
The number as a localized string 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1183 of file klocale.cpp.
.PP
References formatNumber().
.SS "bool KLocale::nounDeclension () const"
.PP
Use this to determine whether nouns are declined in locale's language. 
.PP
This property should remain read-only (no setter function)
.PP
\fBReturns:\fP
.RS 4
If nouns are declined 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 991 of file klocale.cpp.
.SS "\fBQString\fP KLocale::formatDate (const \fBQDate\fP & pDate, bool shortFormat = \fCfalse\fP) const"
.PP
Returns a string formatted to the current locale's conventions regarding dates. 
.PP
\fBParameters:\fP
.RS 4
\fIpDate\fP The date to be formated. 
.br
\fIshortFormat\fP True for non text dates.
.RE
.PP
\fBReturns:\fP
.RS 4
The date as a string 
.RE
.PP

.PP
Definition at line 1193 of file klocale.cpp.
.PP
References QString::append(), QString::at(), calendar(), dateFormat(), dateFormatShort(), QString::length(), KCalendarSystem::month(), monthName(), monthNamePossessive(), QString::unicode(), weekDayName(), and KCalendarSystem::year().
.PP
Referenced by formatDateTime().
.SS "bool KLocale::dateMonthNamePossessive () const"
.PP
Use this to determine whether in dates a possessive form of month name is preferred ('of January' rather than 'January'). 
.PP
\fBReturns:\fP
.RS 4
If possessive form should be used 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 997 of file klocale.cpp.
.SS "\fBQString\fP KLocale::formatTime (const \fBQTime\fP & pTime, bool includeSecs, bool isDuration) const"
.PP
Returns a string formatted to the current locale's conventions regarding times. 
.PP
\fBParameters:\fP
.RS 4
\fIpTime\fP The time to be formated. 
.br
\fIincludeSecs\fP if true, seconds are included in the output, otherwise only hours and minutes are formatted. 
.br
\fIisDuration\fP if true, the given time is a duration, not a clock time. This means 'am/pm' shouldn't be displayed.
.RE
.PP
\fBReturns:\fP
.RS 4
The time as a string 
.RE
.PP

.PP
Definition at line 1717 of file klocale.cpp.
.PP
References QString::at(), QString::length(), QString::stripWhiteSpace(), timeFormat(), translate(), and QString::unicode().
.PP
Referenced by formatDateTime(), and formatTime().
.SS "\fBQString\fP KLocale::formatTime (const \fBQTime\fP & pTime, bool includeSecs = \fCfalse\fP) const"
.PP
Returns a string formatted to the current locale's conventions regarding times. 
.PP
\fBParameters:\fP
.RS 4
\fIpTime\fP The time to be formated. 
.br
\fIincludeSecs\fP if true, seconds are included in the output, otherwise only hours and minutes are formatted.
.RE
.PP
\fBReturns:\fP
.RS 4
The time as a string 
.RE
.PP

.PP
Definition at line 1712 of file klocale.cpp.
.PP
References formatTime().
.SS "bool KLocale::use12Clock () const"
.PP
Use this to determine if the user wants a 12 hour clock. 
.PP
\fBReturns:\fP
.RS 4
If the user wants 12h clock 
.RE
.PP

.PP
Definition at line 1803 of file klocale.cpp.
.PP
References timeFormat().
.SS "bool KLocale::weekStartsMonday () const"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
Please use the weekStartDay method instead.
.PP
Use this to determine if the user wants the week to start on Monday.
.PP
\fBReturns:\fP
.RS 4
true if the week starts on Monday 
.RE
.PP

.PP
Definition at line 1009 of file klocale.cpp.
.SS "int KLocale::weekStartDay () const"
.PP
Use this to determine which day is the first day of the week. 
.PP
\fBReturns:\fP
.RS 4
an integer (Monday=1..Sunday=7) 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 1003 of file klocale.cpp.
.SS "\fBQString\fP KLocale::monthName (int i, bool shortName = \fCfalse\fP) const"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
Returns a string containing the name of the month name used in the Gregorian calendar.
.PP
\fBParameters:\fP
.RS 4
\fIi\fP the month number of the year starting at 1/January. 
.br
\fIshortName\fP we will return the short version of the string.
.RE
.PP
\fBReturns:\fP
.RS 4
The name of the month
.RE
.PP
Typically the correct replacement for this deprecated class is \fBcalendar()\fP->monthString(), which requires a \fBQDate\fP (rather than an integer month) or both a month and a year. This will work across different calendars. Note that you also need to add 
.PP
.nf
 #include <kcalendarsystem.h>

.fi
.PP
 to the applicable file. 
.PP
Definition at line 541 of file klocale.cpp.
.PP
References translate().
.PP
Referenced by formatDate().
.SS "\fBQString\fP KLocale::monthNamePossessive (int i, bool shortName = \fCfalse\fP) const"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
Returns a string containing the possessive form of the month name used in the Gregorian calendar. ('of January', 'of February', etc.) It's needed in long format dates in some languages.
.PP
\fBParameters:\fP
.RS 4
\fIi\fP the month number of the year starting at 1/January. 
.br
\fIshortName\fP we will return the short version of the string.
.RE
.PP
\fBReturns:\fP
.RS 4
The possessive form of the name of the month 
.RE
.PP
\fBSince:\fP
.RS 4
3.1
.RE
.PP
Typically the correct replacement for this deprecated class is \fBcalendar()\fP->\fBmonthNamePossessive()\fP, which requires a \fBQDate\fP (rather than an integer month) or both a month and a year. This will work across dfferent calendars. Note that you also need to add 
.PP
.nf
 #include <kcalendarsystem.h>

.fi
.PP
 to the applicable file. 
.PP
Definition at line 579 of file klocale.cpp.
.PP
References translate().
.PP
Referenced by formatDate().
.SS "\fBQString\fP KLocale::weekDayName (int i, bool shortName = \fCfalse\fP) const"
.PP
\fBDeprecated\fP
.RS 4
use \fBcalendar()\fP->weekDayName 
.RE
.PP
Returns a string containing the name of the week day used in the Gregorian calendar.
.PP
\fBParameters:\fP
.RS 4
\fIi\fP the day number of the week starting at 1/Monday. 
.br
\fIshortName\fP we will return the short version of the string.
.RE
.PP
\fBReturns:\fP
.RS 4
The name of the day 
.RE
.PP

.PP
Definition at line 617 of file klocale.cpp.
.PP
References calendar(), and KCalendarSystem::weekDayName().
.PP
Referenced by formatDate().
.SS "const \fBKCalendarSystem\fP * KLocale::calendar () const"
.PP
Returns a pointer to the calendar system object. 
.PP
\fBReturns:\fP
.RS 4
the current calendar system instance 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 2250 of file klocale.cpp.
.PP
References KCalendarSystemFactory::create().
.PP
Referenced by formatDate(), readDate(), and weekDayName().
.SS "\fBQString\fP KLocale::calendarType () const"
.PP
Returns the name of the calendar system that is currently being used by the system. 
.PP
\fBReturns:\fP
.RS 4
the name of the calendar system 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 2243 of file klocale.cpp.
.SS "void KLocale::setCalendar (const \fBQString\fP & calendarType)"
.PP
Changes the current calendar system to the calendar specified. 
.PP
Currently 'gregorian' and 'hijri' are supported. If the calendar system specified is not found, gregorian will be used.
.PP
\fBParameters:\fP
.RS 4
\fIcalendarType\fP the name of the calendar type 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 2233 of file klocale.cpp.
.SS "\fBQString\fP KLocale::formatDateTime (const \fBQDateTime\fP & pDateTime, bool shortFormat = \fCtrue\fP, bool includeSecs = \fCfalse\fP) const"
.PP
Returns a string formated to the current locale's conventions regarding both date and time. 
.PP
\fBParameters:\fP
.RS 4
\fIpDateTime\fP The date and time to be formated. 
.br
\fIshortFormat\fP using the short date format. 
.br
\fIincludeSecs\fP using the short date format.
.RE
.PP
\fBReturns:\fP
.RS 4
The date and time as a string 
.RE
.PP

.PP
Definition at line 1822 of file klocale.cpp.
.PP
References QString::arg(), formatDate(), formatTime(), and translate().
.SS "double KLocale::readMoney (const \fBQString\fP & numStr, bool * ok = \fC0\fP) const"
.PP
Converts a localized monetary string to a double. 
.PP
\fBParameters:\fP
.RS 4
\fInumStr\fP the string we want to convert. 
.br
\fIok\fP the boolean that is set to false if it's not a number. If \fCok\fP is 0, it will be ignored
.RE
.PP
\fBReturns:\fP
.RS 4
The string converted to a double 
.RE
.PP

.PP
Definition at line 1338 of file klocale.cpp.
.PP
References currencySymbol(), QString::find(), QString::isEmpty(), QString::left(), QString::length(), QString::mid(), monetaryDecimalSymbol(), monetaryThousandsSeparator(), negativeMonetarySignPosition(), negativeSign(), QString::remove(), QString::stripWhiteSpace(), and QString::toDouble().
.SS "double KLocale::readNumber (const \fBQString\fP & numStr, bool * ok = \fC0\fP) const"
.PP
Converts a localized numeric string to a double. 
.PP
\fBParameters:\fP
.RS 4
\fInumStr\fP the string we want to convert. 
.br
\fIok\fP the boolean that is set to false if it's not a number. If \fCok\fP is 0, it will be ignored
.RE
.PP
\fBReturns:\fP
.RS 4
The string converted to a double 
.RE
.PP

.PP
Definition at line 1273 of file klocale.cpp.
.PP
References decimalSymbol(), QString::find(), QString::left(), QString::length(), QString::mid(), negativeSign(), QString::remove(), QString::stripWhiteSpace(), thousandsSeparator(), and QString::toDouble().
.SS "\fBQDate\fP KLocale::readDate (const \fBQString\fP & str, bool * ok = \fC0\fP) const"
.PP
Converts a localized date string to a \fBQDate\fP. 
.PP
The bool pointed by ok will be invalid if the date entered was not valid.
.PP
\fBParameters:\fP
.RS 4
\fIstr\fP the string we want to convert. 
.br
\fIok\fP the boolean that is set to false if it's not a valid date. If \fCok\fP is 0, it will be ignored
.RE
.PP
\fBReturns:\fP
.RS 4
The string converted to a \fBQDate\fP 
.RE
.PP

.PP
Definition at line 1451 of file klocale.cpp.
.PP
References QDate::isValid().
.PP
Referenced by readDate().
.SS "\fBQDate\fP KLocale::readDate (const \fBQString\fP & intstr, const \fBQString\fP & fmt, bool * ok = \fC0\fP) const"
.PP
Converts a localized date string to a \fBQDate\fP, using the specified format. 
.PP
You will usually not want to use this method. 
.PP
Definition at line 1465 of file klocale.cpp.
.PP
References QString::at(), calendar(), KCalendarSystem::dayStringToInteger(), QChar::isSpace(), QString::length(), QString::lower(), QString::mid(), KCalendarSystem::monthName(), KCalendarSystem::monthNamePossessive(), KCalendarSystem::monthStringToInteger(), KCalendarSystem::setYMD(), KCalendarSystem::weekDayName(), KCalendarSystem::year(), and KCalendarSystem::yearStringToInteger().
.SS "\fBQDate\fP KLocale::readDate (const \fBQString\fP & str, ReadDateFlags flags, bool * ok = \fC0\fP) const"
.PP
Converts a localized date string to a \fBQDate\fP. 
.PP
This method is stricter than readDate(str,&ok): it will either accept a date in full format or a date in short format, depending on \fCflags\fP.
.PP
\fBParameters:\fP
.RS 4
\fIstr\fP the string we want to convert. 
.br
\fIflags\fP whether the date string is to be in full format or in short format. 
.br
\fIok\fP the boolean that is set to false if it's not a valid date. If \fCok\fP is 0, it will be ignored
.RE
.PP
\fBReturns:\fP
.RS 4
The string converted to a \fBQDate\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1459 of file klocale.cpp.
.PP
References dateFormat(), dateFormatShort(), and readDate().
.SS "\fBQTime\fP KLocale::readTime (const \fBQString\fP & str, bool * ok = \fC0\fP) const"
.PP
Converts a localized time string to a \fBQTime\fP. 
.PP
This method will try to parse it with seconds, then without seconds. The bool pointed to by \fCok\fP will be set to false if the time entered was not valid.
.PP
\fBParameters:\fP
.RS 4
\fIstr\fP the string we want to convert. 
.br
\fIok\fP the boolean that is set to false if it's not a valid time. If \fCok\fP is 0, it will be ignored
.RE
.PP
\fBReturns:\fP
.RS 4
The string converted to a \fBQTime\fP 
.RE
.PP

.PP
Definition at line 1596 of file klocale.cpp.
.PP
References QTime::isValid().
.SS "\fBQTime\fP KLocale::readTime (const \fBQString\fP & str, ReadTimeFlags flags, bool * ok = \fC0\fP) const"
.PP
Converts a localized time string to a \fBQTime\fP. 
.PP
This method is stricter than readTime(str,&ok): it will either accept a time with seconds or a time without seconds. Use this method when the format is known by the application.
.PP
\fBParameters:\fP
.RS 4
\fIstr\fP the string we want to convert. 
.br
\fIflags\fP whether the time string is expected to contain seconds or not. 
.br
\fIok\fP the boolean that is set to false if it's not a valid time. If \fCok\fP is 0, it will be ignored
.RE
.PP
\fBReturns:\fP
.RS 4
The string converted to a \fBQTime\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1604 of file klocale.cpp.
.PP
References QString::at(), QChar::isSpace(), QString::length(), QString::lower(), QString::mid(), QString::remove(), QString::simplifyWhiteSpace(), timeFormat(), and translate().
.SS "\fBQString\fP KLocale::language () const"
.PP
Returns the language used by this object. 
.PP
The domain AND the library translation must be available in this language. \fBdefaultLanguage()\fP is returned by default, if no other available.
.PP
\fBReturns:\fP
.RS 4
The currently used language. 
.RE
.PP

.PP
Definition at line 531 of file klocale.cpp.
.PP
Referenced by setLanguage(), KConfigBase::setLocale(), and splitLocale().
.SS "\fBQString\fP KLocale::country () const"
.PP
Returns the country code of the country where the user lives. 
.PP
\fBdefaultCountry()\fP is returned by default, if no other available.
.PP
\fBReturns:\fP
.RS 4
The country code for the user. 
.RE
.PP

.PP
Definition at line 536 of file klocale.cpp.
.PP
Referenced by splitLocale().
.SS "\fBQStringList\fP KLocale::languagesTwoAlpha () const"
.PP
Returns the preferred languages as ISO 639-1 codes. 
.PP
This means that information about country is removed. If the internal language code might be represented by more than one 639-1 code, they will all be listed (but only once).
.PP
If the selected languages are 'nn, nb, pt_BR', you will get: 'nn, no, nb, pt'.
.PP
\fBReturns:\fP
.RS 4
List of language codes
.RE
.PP
\fBSee also:\fP
.RS 4
\fBlanguageList\fP 
.RE
.PP

.PP
Definition at line 2151 of file klocale.cpp.
.PP
References QString::find(), KConfigBase::hasKey(), languageList(), KConfigBase::readListEntry(), KConfigBase::setGroup(), and QString::truncate().
.SS "\fBQStringList\fP KLocale::languageList () const"
.PP
Returns the languages selected by user. 
.PP
The codes returned here is the internal language codes.
.PP
\fBReturns:\fP
.RS 4
List of language codes
.RE
.PP
\fBSee also:\fP
.RS 4
\fBlanguagesTwoAlpha\fP 
.RE
.PP

.PP
Definition at line 1817 of file klocale.cpp.
.PP
Referenced by langLookup(), languagesTwoAlpha(), and setLanguage().
.SS "const char * KLocale::encoding () const"
.PP
Returns the user's preferred encoding. 
.PP
\fBReturns:\fP
.RS 4
The name of the preferred encoding
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcodecForEncoding\fP 
.PP
\fBencodingMib\fP 
.RE
.PP

.PP
Definition at line 2120 of file klocale.cpp.
.PP
References codecForEncoding(), and QTextCodec::name().
.SS "int KLocale::encodingMib () const"
.PP
Returns the user's preferred encoding. 
.PP
\fBReturns:\fP
.RS 4
The Mib of the preferred encoding
.RE
.PP
\fBSee also:\fP
.RS 4
\fBencoding\fP 
.PP
\fBcodecForEncoding\fP 
.RE
.PP

.PP
Definition at line 2125 of file klocale.cpp.
.PP
References codecForEncoding(), and QTextCodec::mibEnum().
.SS "\fBQTextCodec\fP * KLocale::codecForEncoding () const"
.PP
Returns the user's preferred encoding. 
.PP
Should never be NULL.
.PP
\fBReturns:\fP
.RS 4
The codec for the preferred encoding
.RE
.PP
\fBSee also:\fP
.RS 4
\fBencoding\fP 
.PP
\fBencodingMib\fP 
.RE
.PP

.PP
Definition at line 2137 of file klocale.cpp.
.PP
Referenced by KCharsets::codecForName(), encoding(), encodingMib(), and fileEncodingMib().
.SS "int KLocale::fileEncodingMib () const"
.PP
Returns the file encoding. 
.PP
\fBReturns:\fP
.RS 4
The Mib of the file encoding
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQFile::encodeName\fP 
.PP
\fBQFile::decodeName\fP 
.RE
.PP

.PP
Definition at line 2130 of file klocale.cpp.
.PP
References codecForEncoding(), and QTextCodec::mibEnum().
.SS "void KLocale::setDateFormat (const \fBQString\fP & format)"
.PP
Changes the current date format. 
.PP
The format of the date is a string which contains variables that will be replaced: 
.PD 0

.IP "\(bu" 2
Y with the century (e.g. '19' for '1984') 
.IP "\(bu" 2
y with the lower 2 digits of the year (e.g. '84' for '1984') 
.IP "\(bu" 2
n with the month (January='1', December='12') 
.IP "\(bu" 2
m with the month with two digits (January='01', December='12') 
.IP "\(bu" 2
e with the day of the month (e.g. '1' on the first of march) 
.IP "\(bu" 2
d with the day of the month with two digits(e.g. '01' on the first of march) 
.IP "\(bu" 2
b with the short form of the month (e.g. 'Jan' for January) 
.IP "\(bu" 2
B with the long form of the month (e.g. 'January') 
.IP "\(bu" 2
a with the short form of the weekday (e.g. 'Wed' for Wednesday) 
.IP "\(bu" 2
A with the long form of the weekday (e.g. 'Wednesday' for Wednesday) Everything else in the format string will be taken as is. For example, March 20th 1989 with the format '%y:%m:%d' results in '89:03:20'.
.PP
\fBParameters:\fP
.RS 4
\fIformat\fP The new date format 
.RE
.PP

.PP
Definition at line 1951 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "void KLocale::setDateFormatShort (const \fBQString\fP & format)"
.PP
Changes the current short date format. 
.PP
The format of the date is a string which contains variables that will be replaced: 
.PD 0

.IP "\(bu" 2
Y with the century (e.g. '19' for '1984') 
.IP "\(bu" 2
y with the lower 2 digits of the year (e.g. '84' for '1984') 
.IP "\(bu" 2
n with the month (January='1', December='12') 
.IP "\(bu" 2
m with the month with two digits (January='01', December='12') 
.IP "\(bu" 2
e with the day of the month (e.g. '1' on the first of march) 
.IP "\(bu" 2
d with the day of the month with two digits(e.g. '01' on the first of march) 
.IP "\(bu" 2
b with the short form of the month (e.g. 'Jan' for January) 
.IP "\(bu" 2
B with the long form of the month (e.g. 'January') 
.IP "\(bu" 2
a with the short form of the weekday (e.g. 'Wed' for Wednesday) 
.IP "\(bu" 2
A with the long form of the weekday (e.g. 'Wednesday' for Wednesday) Everything else in the format string will be taken as is. For example, March 20th 1989 with the format '%y:%m:%d' results in '89:03:20'.
.PP
\fBParameters:\fP
.RS 4
\fIformat\fP The new short date format 
.RE
.PP

.PP
Definition at line 1957 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "void KLocale::setDateMonthNamePossessive (bool possessive)"
.PP
Changes the form of month name used in dates. 
.PP
\fBParameters:\fP
.RS 4
\fIpossessive\fP True if possessive forms should be used 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 1963 of file klocale.cpp.
.SS "void KLocale::setTimeFormat (const \fBQString\fP & format)"
.PP
Changes the current time format. 
.PP
The format of the time is string a which contains variables that will be replaced: 
.PD 0

.IP "\(bu" 2
H with the hour in 24h format and 2 digits (e.g. 5pm is '17', 5am is '05') 
.IP "\(bu" 2
k with the hour in 24h format and one digits (e.g. 5pm is '17', 5am is '5') 
.IP "\(bu" 2
I with the hour in 12h format and 2 digits (e.g. 5pm is '05', 5am is '05') 
.IP "\(bu" 2
l with the hour in 12h format and one digits (e.g. 5pm is '5', 5am is '5') 
.IP "\(bu" 2
M with the minute with 2 digits (e.g. the minute of 07:02:09 is '02') 
.IP "\(bu" 2
S with the seconds with 2 digits (e.g. the minute of 07:02:09 is '09') 
.IP "\(bu" 2
p with pm or am (e.g. 17.00 is 'pm', 05.00 is 'am') Everything else in the format string will be taken as is. For example, 5.23pm with the format '%H:%M' results in '17:23'.
.PP
\fBParameters:\fP
.RS 4
\fIformat\fP The new time format 
.RE
.PP

.PP
Definition at line 1969 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "void KLocale::setWeekStartsMonday (bool start)"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
Please use setWeekStartDay instead.
.PP
Changes how KLocale defines the first day in week.
.PP
\fBParameters:\fP
.RS 4
\fIstart\fP True if Monday is the first day in the week 
.RE
.PP

.PP
Definition at line 1975 of file klocale.cpp.
.SS "void KLocale::setWeekStartDay (int day)"
.PP
Changes how KLocale defines the first day in week. 
.PP
\fBParameters:\fP
.RS 4
\fIday\fP first day of the week (Monday=1..Sunday=7) as integer 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 1984 of file klocale.cpp.
.SS "\fBQString\fP KLocale::dateFormat () const"
.PP
Returns the currently selected date format. 
.PP
\fBReturns:\fP
.RS 4
Current date format. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetDateFormat()\fP 
.RE
.PP

.PP
Definition at line 1993 of file klocale.cpp.
.PP
Referenced by formatDate(), and readDate().
.SS "\fBQString\fP KLocale::dateFormatShort () const"
.PP
Returns the currently selected short date format. 
.PP
\fBReturns:\fP
.RS 4
Current short date format. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetDateFormatShort()\fP 
.RE
.PP

.PP
Definition at line 1999 of file klocale.cpp.
.PP
Referenced by formatDate(), and readDate().
.SS "\fBQString\fP KLocale::timeFormat () const"
.PP
Returns the currently selected time format. 
.PP
\fBReturns:\fP
.RS 4
Current time format. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetTimeFormat()\fP 
.RE
.PP

.PP
Definition at line 2005 of file klocale.cpp.
.PP
Referenced by formatTime(), readTime(), and use12Clock().
.SS "void KLocale::setDecimalSymbol (const \fBQString\fP & symbol)"
.PP
Changes the symbol used to identify the decimal pointer. 
.PP
\fBParameters:\fP
.RS 4
\fIsymbol\fP The new decimal symbol. 
.RE
.PP

.PP
Definition at line 2011 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "void KLocale::setThousandsSeparator (const \fBQString\fP & separator)"
.PP
Changes the separator used to group digits when formating numbers. 
.PP
\fBParameters:\fP
.RS 4
\fIseparator\fP The new thousands separator. 
.RE
.PP

.PP
Definition at line 2017 of file klocale.cpp.
.SS "void KLocale::setPositiveSign (const \fBQString\fP & sign)"
.PP
Changes the sign used to identify a positive number. 
.PP
Normally this is left blank.
.PP
\fBParameters:\fP
.RS 4
\fIsign\fP Sign used for positive numbers. 
.RE
.PP

.PP
Definition at line 2024 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "void KLocale::setNegativeSign (const \fBQString\fP & sign)"
.PP
Changes the sign used to identify a negative number. 
.PP
\fBParameters:\fP
.RS 4
\fIsign\fP Sign used for negative numbers. 
.RE
.PP

.PP
Definition at line 2030 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "void KLocale::setPositiveMonetarySignPosition (\fBSignPosition\fP signpos)"
.PP
Changes the sign position used for positive monetary values. 
.PP
\fBParameters:\fP
.RS 4
\fIsignpos\fP The new sign position 
.RE
.PP

.PP
Definition at line 2036 of file klocale.cpp.
.SS "void KLocale::setNegativeMonetarySignPosition (\fBSignPosition\fP signpos)"
.PP
Changes the sign position used for negative monetary values. 
.PP
\fBParameters:\fP
.RS 4
\fIsignpos\fP The new sign position 
.RE
.PP

.PP
Definition at line 2042 of file klocale.cpp.
.SS "void KLocale::setPositivePrefixCurrencySymbol (bool prefix)"
.PP
Changes the position where the currency symbol should be printed for positive monetary values. 
.PP
\fBParameters:\fP
.RS 4
\fIprefix\fP True if the currency symbol should be prefixed instead of postfixed 
.RE
.PP

.PP
Definition at line 2048 of file klocale.cpp.
.SS "void KLocale::setNegativePrefixCurrencySymbol (bool prefix)"
.PP
Changes the position where the currency symbol should be printed for negative monetary values. 
.PP
\fBParameters:\fP
.RS 4
\fIprefix\fP True if the currency symbol should be prefixed instead of postfixed 
.RE
.PP

.PP
Definition at line 2054 of file klocale.cpp.
.SS "void KLocale::setFracDigits (int digits)"
.PP
Changes the number of digits used when formating numbers. 
.PP
\fBParameters:\fP
.RS 4
\fIdigits\fP The default number of digits to use. 
.RE
.PP

.PP
Definition at line 2060 of file klocale.cpp.
.SS "void KLocale::setMonetaryThousandsSeparator (const \fBQString\fP & separator)"
.PP
Changes the separator used to group digits when formating monetary values. 
.PP
\fBParameters:\fP
.RS 4
\fIseparator\fP The new thousands separator. 
.RE
.PP

.PP
Definition at line 2066 of file klocale.cpp.
.SS "void KLocale::setMonetaryDecimalSymbol (const \fBQString\fP & symbol)"
.PP
Changes the symbol used to identify the decimal pointer for monetary values. 
.PP
\fBParameters:\fP
.RS 4
\fIsymbol\fP The new decimal symbol. 
.RE
.PP

.PP
Definition at line 2073 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "void KLocale::setCurrencySymbol (const \fBQString\fP & symbol)"
.PP
Changes the current currency symbol. 
.PP
\fBParameters:\fP
.RS 4
\fIsymbol\fP The new currency symbol 
.RE
.PP

.PP
Definition at line 2079 of file klocale.cpp.
.PP
References QString::stripWhiteSpace().
.SS "int KLocale::pageSize () const"
.PP
Returns the preferred page size for printing. 
.PP
\fBReturns:\fP
.RS 4
The preferred page size, cast it to QPrinter::PageSize 
.RE
.PP

.PP
Definition at line 2085 of file klocale.cpp.
.SS "void KLocale::setPageSize (int paperFormat)"
.PP
Changes the preferred page size when printing. 
.PP
\fBParameters:\fP
.RS 4
\fIpaperFormat\fP the new preferred page size in the format QPrinter::PageSize 
.RE
.PP

.PP
Definition at line 2091 of file klocale.cpp.
.SS "\fBKLocale::MeasureSystem\fP KLocale::measureSystem () const"
.PP
Returns which measuring system we use. 
.PP
\fBReturns:\fP
.RS 4
The preferred measuring system 
.RE
.PP

.PP
Definition at line 2098 of file klocale.cpp.
.SS "void KLocale::setMeasureSystem (\fBMeasureSystem\fP value)"
.PP
Changes the preferred measuring system. 
.PP
\fBReturns:\fP
.RS 4
value The preferred measuring system 
.RE
.PP

.PP
Definition at line 2104 of file klocale.cpp.
.SS "void KLocale::insertCatalogue (const \fBQString\fP & catalog)"
.PP
Adds another catalog to search for translation lookup. 
.PP
This function is useful for extern libraries and/or code, that provide there own messages.
.PP
If the catalog does not exist for the chosen language, it will be ignored and en_US will be used.
.PP
\fBParameters:\fP
.RS 4
\fIcatalog\fP The catalog to add. 
.RE
.PP

.PP
Definition at line 622 of file klocale.cpp.
.PP
References QString::append().
.SS "void KLocale::removeCatalogue (const \fBQString\fP & catalog)"
.PP
Removes a catalog for translation lookup. 
.PP
\fBParameters:\fP
.RS 4
\fIcatalog\fP The catalog to remove. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBinsertCatalogue()\fP 
.RE
.PP

.PP
Definition at line 671 of file klocale.cpp.
.PP
References QString::remove().
.SS "void KLocale::setActiveCatalogue (const \fBQString\fP & catalog)"
.PP
Sets the active catalog for translation lookup. 
.PP
\fBParameters:\fP
.RS 4
\fIcatalog\fP The catalog to activate. 
.RE
.PP

.PP
Definition at line 680 of file klocale.cpp.
.PP
References QString::prepend(), and QString::remove().
.PP
Referenced by KGlobal::setActiveInstance().
.SS "\fBQString\fP KLocale::translateQt (const char * context, const char * sourceText, const char * message) const"
.PP
Translates a message as a \fBQTranslator\fP is supposed to. 
.PP
The parameters are similar to \fBi18n()\fP, but the result value has other semantics (it can be QString::null) 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 947 of file klocale.cpp.
.PP
References endl().
.SS "\fBQStringList\fP KLocale::allLanguagesTwoAlpha () const"
.PP
Returns list of all known ISO 639-1 codes. 
.PP
\fBReturns:\fP
.RS 4
a list of all language codes 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2191 of file klocale.cpp.
.SS "\fBQString\fP KLocale::twoAlphaToLanguageName (const \fBQString\fP & code) const"
.PP
Convert a ISO 639-1 code to a human readable form. 
.PP
\fBParameters:\fP
.RS 4
\fIcode\fP the language ISO 639-1 code 
.RE
.PP
\fBReturns:\fP
.RS 4
the human readable form 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2199 of file klocale.cpp.
.PP
References QString::find(), QString::left(), QString::lower(), and QString::replace().
.SS "\fBQStringList\fP KLocale::allCountriesTwoAlpha () const"
.PP
Returns list of all known country codes. 
.PP
\fBReturns:\fP
.RS 4
a list of all country codes 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2212 of file klocale.cpp.
.PP
References KGlobal::dirs(), and KStandardDirs::findAllResources().
.SS "\fBQString\fP KLocale::twoAlphaToCountryName (const \fBQString\fP & code) const"
.PP
Convert a country code to a human readable form. 
.PP
\fBParameters:\fP
.RS 4
\fIcode\fP the country code 
.RE
.PP
\fBReturns:\fP
.RS 4
the human readable form of the country name 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2226 of file klocale.cpp.
.SS "void KLocale::splitLocale (const \fBQString\fP & str, \fBQString\fP & language, \fBQString\fP & country, \fBQString\fP & charset)\fC [static]\fP"
.PP
Returns the parts of the parameter str understood as language setting the format is language_COUNTRY.charset. 
.PP
\fBParameters:\fP
.RS 4
\fIstr\fP The string to split. 
.br
\fIlanguage\fP This will be set to the language part of the string. 
.br
\fIcountry\fP This will be set to the country part of the string. 
.br
\fIcharset\fP This will be set to the charset part of the string. 
.RE
.PP

.PP
Definition at line 498 of file klocale.cpp.
.PP
References country(), QString::find(), language(), QString::mid(), and QString::truncate().
.SS "void KLocale::setMainCatalogue (const char * catalog)\fC [static]\fP"
.PP
Use this as main catalog for *all* KLocales, if not the appname will be used. 
.PP
This function is best to be the very first instruction in your program's main function as it only has an effect before the first KLocale object is created.
.PP
\fBParameters:\fP
.RS 4
\fIcatalog\fP Catalogue to override all other main catalogues. 
.RE
.PP

.PP
Definition at line 1268 of file klocale.cpp.
.SS "\fBQString\fP KLocale::langLookup (const \fBQString\fP & fname, const char * rtype = \fC'html'\fP)\fC [static]\fP"
.PP
Finds localized resource in resourceDir( rtype ) + <lang> + fname. 
.PP
\fBParameters:\fP
.RS 4
\fIfname\fP relative path to find 
.br
\fIrtype\fP resource type to use 
.RE
.PP

.PP
Definition at line 1874 of file klocale.cpp.
.PP
References defaultLanguage(), KGlobal::dirs(), endl(), QFileInfo::exists(), QFileInfo::isFile(), QFileInfo::isReadable(), languageList(), KGlobal::locale(), and KStandardDirs::resourceDirs().
.SS "\fBQString\fP KLocale::defaultLanguage ()\fC [static]\fP"
.PP
Returns the name of the internal language. 
.PP
\fBReturns:\fP
.RS 4
Name of the default language 
.RE
.PP

.PP
Definition at line 2110 of file klocale.cpp.
.PP
References QString::fromLatin1().
.PP
Referenced by langLookup(), setLanguage(), and KConfigBase::setLocale().
.SS "\fBQString\fP KLocale::defaultCountry ()\fC [static]\fP"
.PP
Returns the name of the default country. 
.PP
\fBReturns:\fP
.RS 4
Name of the default country 
.RE
.PP

.PP
Definition at line 2115 of file klocale.cpp.
.PP
References QString::fromLatin1().
.SS "\fBQString\fP KLocale::formatMoney (const \fBQString\fP & numStr) const"
.PP
\fBDeprecated\fP
.RS 4
use formatMoney(double) 
.RE
.PP

.PP
Definition at line 1160 of file klocale.cpp.
.PP
References formatMoney().
.SS "\fBQString\fP KLocale::formatNumber (const \fBQString\fP & numStr) const"
.PP
\fBDeprecated\fP
.RS 4
use formatNumber(double) 
.RE
.PP

.PP
Definition at line 1188 of file klocale.cpp.
.PP
References formatNumber().
.SS "\fBQString\fP KLocale::languages () const"
.PP
\fBDeprecated\fP
.RS 4
Use \fBlanguageList()\fP 
.RE
.PP
\fBReturns:\fP
.RS 4
String containing language codes separated by colons 
.RE
.PP

.PP
Definition at line 1812 of file klocale.cpp.
.PP
Referenced by KLocale(), and setLanguage().
.SS "bool KLocale::setCharset (const \fBQString\fP & charset)"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
\fBReturns:\fP
.RS 4
True 
.RE
.PP

.PP
Definition at line 2300 of file klocale.cpp.
.SS "\fBQString\fP KLocale::charset () const"
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP
\fBSee also:\fP
.RS 4
\fBencoding\fP 
.RE
.PP

.PP
Definition at line 2301 of file klocale.cpp.
.PP
References QString::fromLatin1().
.SH "Friends And Related Function Documentation"
.PP 
.SS "I18N_NOOP(x)\fC [related]\fP"
.PP
I18N_NOOP marks a string to be translated without translating it. 
.PP
Do not use this unless you know you need it. http://developer.kde.org/documentation/other/developer-faq.html#q2.11.2 
.PP
Definition at line 48 of file klocale.h.
.SS "I18N_NOOP2(comment, x)\fC [related]\fP"
.PP
If the string is too ambiguous to be translated well to a non-english language, use this instead of I18N_NOOP to separate lookup string and english. 
.PP
Warning: you need to call i18n( comment, stringVar ) later on, not just i18n( stringVar ). 
.PP
Definition at line 58 of file klocale.h.
.SS "KDECORE_EXPORT \fBQString\fP i18n (const char * text)\fC [related]\fP"
.PP
i18n is the function that does everything you need to translate a string. 
.PP
You just wrap around every user visible string a i18n call to get a \fBQString\fP with the string in the user's preferred language.
.PP
The argument must be an UTF-8 encoded string (If you only use characters that are in US-ASCII, you're on the safe side. But for e.g. german umlauts or french accents should be recoded to UTF-8) 
.PP
Definition at line 1831 of file klocale.cpp.
.PP
References QString::fromUtf8(), and KGlobal::locale().
.SS "KDECORE_EXPORT \fBQString\fP i18n (const char * comment, const char * text)\fC [related]\fP"
.PP
If the string is too ambiguous to be translated well to a non-english language, use this form of i18n to separate lookup string and english text. 
.PP
\fBSee also:\fP
.RS 4
\fBtranslate\fP 
.RE
.PP

.PP
Definition at line 1839 of file klocale.cpp.
.PP
References QString::fromUtf8(), and KGlobal::locale().
.SS "KDECORE_EXPORT \fBQString\fP i18n (const char * singular, const char * plural, unsigned long n)\fC [related]\fP"
.PP
If you want to handle plural forms, use this form of i18n. 
.PP
\fBParameters:\fP
.RS 4
\fIsingular\fP the singular form of the word, for example 'file'. 
.br
\fIplural\fP the plural form of the word. Must contain a '%n' that will be replaced by the number \fCn\fP, for example '%n files' 
.br
\fIn\fP the number 
.RE
.PP
\fBReturns:\fP
.RS 4
the correct singular or plural for the selected language, depending on n 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBtranslate\fP 
.RE
.PP

.PP
Definition at line 1847 of file klocale.cpp.
.PP
References KGlobal::locale().
.SS "\fBQString\fP tr2i18n (const char * message, const char * = \fC0\fP)\fC [related]\fP"
.PP
Qt3's uic generates i18n( 'msg', 'comment' ) calls which conflict with our i18n method. 
.PP
We use uic -tr tr2i18n to redirect to the right \fBi18n()\fP function 
.PP
Definition at line 103 of file klocale.h.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
