\section{KLocale Class Reference}
\label{classKLocale}\index{KLocale@{KLocale}}
KLocale provides support for country specific stuff like the national language. class for supporting locale settings and national language.  


{\tt \#include $<$klocale.h$>$}

Collaboration diagram for KLocale:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=105pt]{classKLocale__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Sign\-Position} \{ \par
{\bf Parens\-Around} =  0, 
{\bf Before\-Quantity\-Money} =  1, 
{\bf After\-Quantity\-Money} =  2, 
{\bf Before\-Money} =  3, 
\par
{\bf After\-Money} =  4
 \}
\item 
enum {\bf Read\-Date\-Flags} \{ {\bf Normal\-Format} =  1, 
{\bf Short\-Format} =  2
 \}
\item 
enum {\bf Read\-Time\-Flags} \{ {\bf With\-Seconds} =  0, 
{\bf Without\-Seconds} =  1
 \}
\item 
enum {\bf Measure\-System} \{ {\bf Metric}, 
{\bf Imperial}
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KLocale} (const {\bf QString} \&catalog, {\bf KConfig} $\ast$config=0)
\item 
{\bf KLocale} (const {\bf KLocale} \&rhs)
\item 
{\bf KLocale} \& {\bf operator=} (const {\bf KLocale} \&rhs)
\item 
{\bf $\sim$KLocale} ()
\item 
{\bf QString} {\bf translate} (const char $\ast$index) const 
\item 
{\bf QString} {\bf translate} (const char $\ast$comment, const char $\ast$fallback) const 
\item 
{\bf QString} {\bf translate} (const char $\ast$singular, const char $\ast$plural, unsigned long n) const 
\item 
bool {\bf set\-Encoding} (int mib\-Enum)
\item 
bool {\bf set\-Language} (const {\bf QString} \&language)
\item 
bool {\bf set\-Language} (const {\bf QString\-List} \&languages)
\item 
bool {\bf set\-Country} (const {\bf QString} \&country)
\item 
{\bf QString} {\bf decimal\-Symbol} () const 
\item 
{\bf QString} {\bf thousands\-Separator} () const 
\item 
{\bf QString} {\bf currency\-Symbol} () const 
\item 
{\bf QString} {\bf monetary\-Decimal\-Symbol} () const 
\item 
{\bf QString} {\bf monetary\-Thousands\-Separator} () const 
\item 
{\bf QString} {\bf positive\-Sign} () const 
\item 
{\bf QString} {\bf negative\-Sign} () const 
\item 
int {\bf frac\-Digits} () const 
\item 
bool {\bf positive\-Prefix\-Currency\-Symbol} () const 
\item 
bool {\bf negative\-Prefix\-Currency\-Symbol} () const 
\item 
{\bf Sign\-Position} {\bf positive\-Monetary\-Sign\-Position} () const 
\item 
{\bf Sign\-Position} {\bf negative\-Monetary\-Sign\-Position} () const 
\item 
{\bf QString} {\bf format\-Money} (double num, const {\bf QString} \&currency=QString::null, int digits=-1) const 
\item 
{\bf QString} {\bf format\-Number} (double num, int precision=-1) const 
\item 
{\bf QString} {\bf format\-Long} (long num) const 
\item 
bool {\bf noun\-Declension} () const 
\item 
{\bf QString} {\bf format\-Date} (const {\bf QDate} \&p\-Date, bool short\-Format=false) const 
\item 
bool {\bf date\-Month\-Name\-Possessive} () const 
\item 
{\bf QString} {\bf format\-Time} (const {\bf QTime} \&p\-Time, bool include\-Secs, bool is\-Duration) const 
\item 
{\bf QString} {\bf format\-Time} (const {\bf QTime} \&p\-Time, bool include\-Secs=false) const 
\item 
bool {\bf use12Clock} () const 
\item 
bool {\bf week\-Starts\-Monday} () const KDE\_\-DEPRECATED
\item 
int {\bf week\-Start\-Day} () const 
\item 
{\bf QString} {\bf month\-Name} (int i, bool short\-Name=false) const KDE\_\-DEPRECATED
\item 
{\bf QString} {\bf month\-Name\-Possessive} (int i, bool short\-Name=false) const KDE\_\-DEPRECATED
\item 
{\bf QString} {\bf week\-Day\-Name} (int i, bool short\-Name=false) const KDE\_\-DEPRECATED
\item 
const {\bf KCalendar\-System} $\ast$ {\bf calendar} () const 
\item 
{\bf QString} {\bf calendar\-Type} () const 
\item 
void {\bf set\-Calendar} (const {\bf QString} \&calendar\-Type)
\item 
{\bf QString} {\bf format\-Date\-Time} (const {\bf QDate\-Time} \&p\-Date\-Time, bool short\-Format=true, bool include\-Secs=false) const 
\item 
double {\bf read\-Money} (const {\bf QString} \&num\-Str, bool $\ast$ok=0) const 
\item 
double {\bf read\-Number} (const {\bf QString} \&num\-Str, bool $\ast$ok=0) const 
\item 
{\bf QDate} {\bf read\-Date} (const {\bf QString} \&str, bool $\ast$ok=0) const 
\item 
{\bf QDate} {\bf read\-Date} (const {\bf QString} \&intstr, const {\bf QString} \&fmt, bool $\ast$ok=0) const 
\item 
{\bf QDate} {\bf read\-Date} (const {\bf QString} \&str, Read\-Date\-Flags flags, bool $\ast$ok=0) const 
\item 
{\bf QTime} {\bf read\-Time} (const {\bf QString} \&str, bool $\ast$ok=0) const 
\item 
{\bf QTime} {\bf read\-Time} (const {\bf QString} \&str, Read\-Time\-Flags flags, bool $\ast$ok=0) const 
\item 
{\bf QString} {\bf language} () const 
\item 
{\bf QString} {\bf country} () const 
\item 
{\bf QString\-List} {\bf languages\-Two\-Alpha} () const 
\item 
{\bf QString\-List} {\bf language\-List} () const 
\item 
const char $\ast$ {\bf encoding} () const 
\item 
int {\bf encoding\-Mib} () const 
\item 
{\bf QText\-Codec} $\ast$ {\bf codec\-For\-Encoding} () const 
\item 
int {\bf file\-Encoding\-Mib} () const 
\item 
void {\bf set\-Date\-Format} (const {\bf QString} \&format)
\item 
void {\bf set\-Date\-Format\-Short} (const {\bf QString} \&format)
\item 
void {\bf set\-Date\-Month\-Name\-Possessive} (bool possessive)
\item 
void {\bf set\-Time\-Format} (const {\bf QString} \&format)
\item 
void {\bf set\-Week\-Starts\-Monday} (bool start) KDE\_\-DEPRECATED
\item 
void {\bf set\-Week\-Start\-Day} (int day)
\item 
{\bf QString} {\bf date\-Format} () const 
\item 
{\bf QString} {\bf date\-Format\-Short} () const 
\item 
{\bf QString} {\bf time\-Format} () const 
\item 
void {\bf set\-Decimal\-Symbol} (const {\bf QString} \&symbol)
\item 
void {\bf set\-Thousands\-Separator} (const {\bf QString} \&separator)
\item 
void {\bf set\-Positive\-Sign} (const {\bf QString} \&sign)
\item 
void {\bf set\-Negative\-Sign} (const {\bf QString} \&sign)
\item 
void {\bf set\-Positive\-Monetary\-Sign\-Position} ({\bf Sign\-Position} signpos)
\item 
void {\bf set\-Negative\-Monetary\-Sign\-Position} ({\bf Sign\-Position} signpos)
\item 
void {\bf set\-Positive\-Prefix\-Currency\-Symbol} (bool prefix)
\item 
void {\bf set\-Negative\-Prefix\-Currency\-Symbol} (bool prefix)
\item 
void {\bf set\-Frac\-Digits} (int digits)
\item 
void {\bf set\-Monetary\-Thousands\-Separator} (const {\bf QString} \&separator)
\item 
void {\bf set\-Monetary\-Decimal\-Symbol} (const {\bf QString} \&symbol)
\item 
void {\bf set\-Currency\-Symbol} (const {\bf QString} \&symbol)
\item 
int {\bf page\-Size} () const 
\item 
void {\bf set\-Page\-Size} (int paper\-Format)
\item 
{\bf Measure\-System} {\bf measure\-System} () const 
\item 
void {\bf set\-Measure\-System} ({\bf Measure\-System} value)
\item 
void {\bf insert\-Catalogue} (const {\bf QString} \&catalog)
\item 
void {\bf remove\-Catalogue} (const {\bf QString} \&catalog)
\item 
void {\bf set\-Active\-Catalogue} (const {\bf QString} \&catalog)
\item 
{\bf QString} {\bf translate\-Qt} (const char $\ast$context, const char $\ast$source\-Text, const char $\ast$message) const 
\item 
{\bf QString\-List} {\bf all\-Languages\-Two\-Alpha} () const 
\item 
{\bf QString} {\bf two\-Alpha\-To\-Language\-Name} (const {\bf QString} \&code) const 
\item 
{\bf QString\-List} {\bf all\-Countries\-Two\-Alpha} () const 
\item 
{\bf QString} {\bf two\-Alpha\-To\-Country\-Name} (const {\bf QString} \&code) const 
\item 
{\bf QString} {\bf format\-Money} (const {\bf QString} \&num\-Str) const KDE\_\-DEPRECATED
\item 
{\bf QString} {\bf format\-Number} (const {\bf QString} \&num\-Str) const KDE\_\-DEPRECATED
\item 
{\bf QString} {\bf languages} () const KDE\_\-DEPRECATED
\item 
bool {\bf set\-Charset} (const {\bf QString} \&charset) KDE\_\-DEPRECATED
\item 
{\bf QString} {\bf charset} () const KDE\_\-DEPRECATED
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static void {\bf split\-Locale} (const {\bf QString} \&str, {\bf QString} \&language, {\bf QString} \&country, {\bf QString} \&charset)
\item 
static void {\bf set\-Main\-Catalogue} (const char $\ast$catalog)
\item 
static {\bf QString} {\bf lang\-Lookup} (const {\bf QString} \&fname, const char $\ast$rtype=\char`\"{}html\char`\"{})
\item 
static {\bf QString} {\bf default\-Language} ()
\item 
static {\bf QString} {\bf default\-Country} ()
\item 
static {\bf QString} {\bf \_\-init\-Language} ({\bf KConfig\-Base} $\ast$config)\label{classKLocale_e5}

\end{CompactItemize}
\subsection*{Static Protected Member Functions}
\begin{CompactItemize}
\item 
static void {\bf init\-Instance} ()\label{classKLocale_f0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KGlobal}\label{classKLocale_n0}

\end{CompactItemize}
\subsection*{Related Functions}
(Note that these are not member functions.) \begin{CompactItemize}
\item 
{\bf I18N\_\-NOOP}(x)
\item 
{\bf I18N\_\-NOOP2}(comment, x)
\item 
KDECORE\_\-EXPORT {\bf QString} {\bf i18n} (const char $\ast$text)
\item 
KDECORE\_\-EXPORT {\bf QString} {\bf i18n} (const char $\ast$comment, const char $\ast$text)
\item 
KDECORE\_\-EXPORT {\bf QString} {\bf i18n} (const char $\ast$singular, const char $\ast$plural, unsigned long n)
\item 
{\bf QString} {\bf tr2i18n} (const char $\ast$message, const char $\ast$=0)
\end{CompactItemize}


\subsection{Detailed Description}
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.

\begin{Desc}
\item[Author:]Stephan Kulow $<${\tt coolo@kde.org}$>$, Preston Brown $<${\tt pbrown@kde.org}$>$, Hans Petter Bieker $<${\tt bieker@kde.org}$>$, Lukas Tinkl $<${\tt lukas.tinkl@suse.cz}$>$ \end{Desc}




Definition at line 119 of file klocale.h.

\subsection{Member Enumeration Documentation}
\index{KLocale@{KLocale}!SignPosition@{SignPosition}}
\index{SignPosition@{SignPosition}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KLocale::Sign\-Position}}\label{classKLocale_w11}


Various positions for where to place the positive or negative sign when they are related to a monetary value. 



Definition at line 262 of file klocale.h.\index{KLocale@{KLocale}!MeasureSystem@{MeasureSystem}}
\index{MeasureSystem@{MeasureSystem}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KLocale::Measure\-System}}\label{classKLocale_w14}


The Metric system will give you information in mm, while the Imperial system will give you information in inches. 



Definition at line 977 of file klocale.h.

\subsection{Constructor \& Destructor Documentation}
\index{KLocale@{KLocale}!KLocale@{KLocale}}
\index{KLocale@{KLocale}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KLocale::KLocale (const {\bf QString} \& {\em catalog}, {\bf KConfig} $\ast$ {\em config} = {\tt 0})}\label{classKLocale_a0}


Constructs a KLocale with the given catalog name. 

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.

If you specify a configuration file, it has to be valid until the KLocale object is destroyed.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em catalog}]The name of the main language file \item[{\em config}]The configuration file to use. \end{description}
\end{Desc}


Definition at line 76 of file klocale.cpp.

References KInstance::config(), KGlobal::instance(), and languages().\index{KLocale@{KLocale}!KLocale@{KLocale}}
\index{KLocale@{KLocale}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KLocale::KLocale (const {\bf KLocale} \& {\em rhs})}\label{classKLocale_a1}


Copy constructor. 



Definition at line 2261 of file klocale.cpp.\index{KLocale@{KLocale}!~KLocale@{$\sim$KLocale}}
\index{~KLocale@{$\sim$KLocale}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KLocale::$\sim${\bf KLocale} ()}\label{classKLocale_a3}


Destructor. 



Definition at line 689 of file klocale.cpp.

\subsection{Member Function Documentation}
\index{KLocale@{KLocale}!operator=@{operator=}}
\index{operator=@{operator=}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLocale} \& KLocale::operator= (const {\bf KLocale} \& {\em rhs})}\label{classKLocale_a2}


Assignment operator. 



Definition at line 2268 of file klocale.cpp.

References QString::d().\index{KLocale@{KLocale}!translate@{translate}}
\index{translate@{translate}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::translate (const char $\ast$ {\em index}) const}\label{classKLocale_a4}


Translates the string into the corresponding string in the national language, if available. 

If not, returns the string itself. There is a {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} 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.

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)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]The lookup text and default text, if not found. \end{description}
\end{Desc}


Definition at line 746 of file klocale.cpp.

Referenced by format\-Date\-Time(), format\-Time(), month\-Name(), KCalendar\-System\-Jalali::month\-Name(), month\-Name\-Possessive(), read\-Time(), KCalendar\-System\-Jalali::week\-Day\-Name(), and KCalendar\-System::week\-Day\-Name().\index{KLocale@{KLocale}!translate@{translate}}
\index{translate@{translate}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::translate (const char $\ast$ {\em comment}, const char $\ast$ {\em fallback}) const}\label{classKLocale_a5}


Translates the string into the corresponding string in the national language, if available. 

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.

Most of the times the translators will tell you if it can't be translated as it, but think of cases as \char`\"{}New\char`\"{}, where the translations differs depending on what is New. Or simple cases as \char`\"{}Open\char`\"{}, 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.

If translate(\char`\"{}Open\char`\"{}) is not enough to translate it well, use translate(\char`\"{}To Open\char`\"{}, \char`\"{}Open\char`\"{}) or translate(\char`\"{}Is Open\char`\"{}, \char`\"{}Open\char`\"{}). The english user will see \char`\"{}Open\char`\"{} in both cases, but the translated version may vary. Of course you can also use {\bf i18n()}{\rm (p.\,\pageref{classKLocale_m2})}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em comment}]the comment. The lookup text is made out of comment + {\tt fallback} \item[{\em fallback}]the default text, if not found \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]translation \end{Desc}


Definition at line 751 of file klocale.cpp.

References endl(), and QString::from\-Utf8().\index{KLocale@{KLocale}!translate@{translate}}
\index{translate@{translate}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::translate (const char $\ast$ {\em singular}, const char $\ast$ {\em plural}, unsigned long {\em n}) const}\label{classKLocale_a6}


Used to get the correct, translated singular or plural of a word. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em singular}]the singular form of the word, for example \char`\"{}file\char`\"{}. \item[{\em plural}]the plural form of the word. Must contain a \char`\"{}\%n\char`\"{} that will be replaced by the number {\tt n}, for example \char`\"{}\%n files\char`\"{} \item[{\em n}]the number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the correct singular or plural for the selected language, depending on n \end{Desc}


Definition at line 787 of file klocale.cpp.

References endl(), QString::find(), QString::from\-Utf8(), QString::is\-Empty(), and QString\-List::split().\index{KLocale@{KLocale}!setEncoding@{setEncoding}}
\index{setEncoding@{setEncoding}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::set\-Encoding (int {\em mib\-Enum})}\label{classKLocale_a7}


Changes the current encoding. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mib\-Enum}]The mib of the preferred codec\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True on success. \end{Desc}


Definition at line 2142 of file klocale.cpp.

References QText\-Codec::codec\-For\-Mib().\index{KLocale@{KLocale}!setLanguage@{setLanguage}}
\index{setLanguage@{setLanguage}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::set\-Language (const {\bf QString} \& {\em language})}\label{classKLocale_a8}


Changes the current language. 

The current language will be left unchanged if failed. It will force a reload of the country specific configuration as well.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em language}]The language code.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True on success. \end{Desc}


Definition at line 398 of file klocale.cpp.

References language(), QString::prepend(), and QString::remove().\index{KLocale@{KLocale}!setLanguage@{setLanguage}}
\index{setLanguage@{setLanguage}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::set\-Language (const {\bf QString\-List} \& {\em languages})}\label{classKLocale_a9}


Changes the list of prefed languages for the locale. 

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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em languages}]The list of language codes.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if one of the specified languages were used. \end{Desc}


Definition at line 416 of file klocale.cpp.

References default\-Language(), language\-List(), and languages().\index{KLocale@{KLocale}!setCountry@{setCountry}}
\index{setCountry@{setCountry}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::set\-Country (const {\bf QString} \& {\em country})}\label{classKLocale_a10}


Changes the current country. 

The current country will be left unchanged if failed. It will force a reload of the country specific configuration.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em country}]The ISO 3166 country code.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True on success. \end{Desc}


Definition at line 375 of file klocale.cpp.\index{KLocale@{KLocale}!decimalSymbol@{decimalSymbol}}
\index{decimalSymbol@{decimalSymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::decimal\-Symbol () const}\label{classKLocale_a11}


Returns what a decimal point should look like (\char`\"{}.\char`\"{} or \char`\"{},\char`\"{} etc.) according to the current locale or user settings. 

\begin{Desc}
\item[Returns:]The decimal symbol used by locale. \end{Desc}


Definition at line 1015 of file klocale.cpp.

Referenced by format\-Number(), and read\-Number().\index{KLocale@{KLocale}!thousandsSeparator@{thousandsSeparator}}
\index{thousandsSeparator@{thousandsSeparator}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::thousands\-Separator () const}\label{classKLocale_a12}


Returns what the thousands separator should look like (\char`\"{},\char`\"{} or \char`\"{}.\char`\"{} etc.) according to the current locale or user settings. 

\begin{Desc}
\item[Returns:]The thousands separator used by locale. \end{Desc}


Definition at line 1021 of file klocale.cpp.

Referenced by format\-Number(), and read\-Number().\index{KLocale@{KLocale}!currencySymbol@{currencySymbol}}
\index{currencySymbol@{currencySymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::currency\-Symbol () const}\label{classKLocale_a13}


Returns what the symbol denoting currency in the current locale as as defined by user settings should look like. 

\begin{Desc}
\item[Returns:]The default currency symbol used by locale. \end{Desc}


Definition at line 1027 of file klocale.cpp.

Referenced by format\-Money(), and read\-Money().\index{KLocale@{KLocale}!monetaryDecimalSymbol@{monetaryDecimalSymbol}}
\index{monetaryDecimalSymbol@{monetaryDecimalSymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::monetary\-Decimal\-Symbol () const}\label{classKLocale_a14}


Returns what a decimal point should look like (\char`\"{}.\char`\"{} or \char`\"{},\char`\"{} etc.) for monetary values, according to the current locale or user settings. 

\begin{Desc}
\item[Returns:]The monetary decimal symbol used by locale. \end{Desc}


Definition at line 1033 of file klocale.cpp.

Referenced by format\-Money(), and read\-Money().\index{KLocale@{KLocale}!monetaryThousandsSeparator@{monetaryThousandsSeparator}}
\index{monetaryThousandsSeparator@{monetaryThousandsSeparator}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::monetary\-Thousands\-Separator () const}\label{classKLocale_a15}


Returns what a thousands separator for monetary values should look like (\char`\"{},\char`\"{} or \char`\"{} \char`\"{} etc.) according to the current locale or user settings. 

\begin{Desc}
\item[Returns:]The monetary thousands separator used by locale. \end{Desc}


Definition at line 1039 of file klocale.cpp.

Referenced by format\-Money(), and read\-Money().\index{KLocale@{KLocale}!positiveSign@{positiveSign}}
\index{positiveSign@{positiveSign}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::positive\-Sign () const}\label{classKLocale_a16}


Returns what a positive sign should look like (\char`\"{}+\char`\"{}, \char`\"{} \char`\"{}, etc.) according to the current locale or user settings. 

\begin{Desc}
\item[Returns:]The positive sign used by locale. \end{Desc}


Definition at line 1045 of file klocale.cpp.

Referenced by format\-Money(), and format\-Number().\index{KLocale@{KLocale}!negativeSign@{negativeSign}}
\index{negativeSign@{negativeSign}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::negative\-Sign () const}\label{classKLocale_a17}


Returns what a negative sign should look like (\char`\"{}-\char`\"{}, etc.) according to the current locale or user settings. 

\begin{Desc}
\item[Returns:]The negative sign used by locale. \end{Desc}


Definition at line 1051 of file klocale.cpp.

Referenced by format\-Money(), format\-Number(), read\-Money(), and read\-Number().\index{KLocale@{KLocale}!fracDigits@{fracDigits}}
\index{fracDigits@{fracDigits}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KLocale::frac\-Digits () const}\label{classKLocale_a18}


The number of fractional digits to include in numeric/monetary values (usually 2). 

\begin{Desc}
\item[Returns:]Default number of fractional digits used by locale. \end{Desc}


Definition at line 1057 of file klocale.cpp.

Referenced by format\-Money().\index{KLocale@{KLocale}!positivePrefixCurrencySymbol@{positivePrefixCurrencySymbol}}
\index{positivePrefixCurrencySymbol@{positivePrefixCurrencySymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::positive\-Prefix\-Currency\-Symbol () const}\label{classKLocale_a19}


If and only if the currency symbol precedes a positive value, this will be true. 

\begin{Desc}
\item[Returns:]Where to print the currency symbol for positive numbers. \end{Desc}


Definition at line 1063 of file klocale.cpp.

Referenced by format\-Money().\index{KLocale@{KLocale}!negativePrefixCurrencySymbol@{negativePrefixCurrencySymbol}}
\index{negativePrefixCurrencySymbol@{negativePrefixCurrencySymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::negative\-Prefix\-Currency\-Symbol () const}\label{classKLocale_a20}


If and only if the currency symbol precedes a negative value, this will be true. 

\begin{Desc}
\item[Returns:]True if the currency symbol precedes negative numbers. \end{Desc}


Definition at line 1069 of file klocale.cpp.

Referenced by format\-Money().\index{KLocale@{KLocale}!positiveMonetarySignPosition@{positiveMonetarySignPosition}}
\index{positiveMonetarySignPosition@{positiveMonetarySignPosition}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLocale::Sign\-Position} KLocale::positive\-Monetary\-Sign\-Position () const}\label{classKLocale_a21}


Returns the position of a positive sign in relation to a monetary value. 

\begin{Desc}
\item[Returns:]Where/how to print the positive sign. \end{Desc}
\begin{Desc}
\item[See also:]{\bf Sign\-Position}{\rm (p.\,\pageref{classKLocale_w11})} \end{Desc}


Definition at line 1075 of file klocale.cpp.

Referenced by format\-Money().\index{KLocale@{KLocale}!negativeMonetarySignPosition@{negativeMonetarySignPosition}}
\index{negativeMonetarySignPosition@{negativeMonetarySignPosition}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLocale::Sign\-Position} KLocale::negative\-Monetary\-Sign\-Position () const}\label{classKLocale_a22}


Denotes where to place a negative sign in relation to a monetary value. 

\begin{Desc}
\item[Returns:]Where/how to print the negative sign. \end{Desc}
\begin{Desc}
\item[See also:]{\bf Sign\-Position}{\rm (p.\,\pageref{classKLocale_w11})} \end{Desc}


Definition at line 1081 of file klocale.cpp.

Referenced by format\-Money(), and read\-Money().\index{KLocale@{KLocale}!formatMoney@{formatMoney}}
\index{formatMoney@{formatMoney}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Money (double {\em num}, const {\bf QString} \& {\em currency} = {\tt QString::null}, int {\em digits} = {\tt -1}) const}\label{classKLocale_a23}


Given a double, converts that to a numeric string containing the localized monetary equivalent. 

e.g. given 123456, return \char`\"{}\$ 123,456.00\char`\"{}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]The number we want to format \item[{\em currency}]The currency symbol you want. \item[{\em digits}]Number of fractional digits, or -1 for the default value\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The number of money as a localized string \end{Desc}
\begin{Desc}
\item[See also:]{\bf frac\-Digits()}{\rm (p.\,\pageref{classKLocale_a18})} \end{Desc}


Definition at line 1099 of file klocale.cpp.

References QString::append(), currency\-Symbol(), QString::find(), frac\-Digits(), QString::insert(), QString::is\-Null(), QString::length(), monetary\-Decimal\-Symbol(), monetary\-Thousands\-Separator(), negative\-Monetary\-Sign\-Position(), negative\-Prefix\-Currency\-Symbol(), negative\-Sign(), QString::number(), positive\-Monetary\-Sign\-Position(), positive\-Prefix\-Currency\-Symbol(), positive\-Sign(), QString::prepend(), and QString::replace().

Referenced by format\-Money().\index{KLocale@{KLocale}!formatNumber@{formatNumber}}
\index{formatNumber@{formatNumber}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Number (double {\em num}, int {\em precision} = {\tt -1}) const}\label{classKLocale_a24}


Given a double, converts that to a numeric string containing the localized numeric equivalent. 

e.g. given 123456.78F, return \char`\"{}123,456.78\char`\"{} (for some European country). If precision isn't specified, 2 is used.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]The number to convert \item[{\em precision}]Number of fractional digits used.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The number as a localized string \end{Desc}


Definition at line 1165 of file klocale.cpp.

References decimal\-Symbol(), QString::find(), QString::insert(), QString::length(), negative\-Sign(), QString::number(), positive\-Sign(), QString::prepend(), QString::replace(), and thousands\-Separator().

Referenced by format\-Long(), and format\-Number().\index{KLocale@{KLocale}!formatLong@{formatLong}}
\index{formatLong@{formatLong}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Long (long {\em num}) const}\label{classKLocale_a25}


Given an integer, converts that to a numeric string containing the localized numeric equivalent. 

e.g. given 123456L, return \char`\"{}123,456\char`\"{} (for some European country).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]The number to convert\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The number as a localized string \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1183 of file klocale.cpp.

References format\-Number().\index{KLocale@{KLocale}!nounDeclension@{nounDeclension}}
\index{nounDeclension@{nounDeclension}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::noun\-Declension () const}\label{classKLocale_a26}


Use this to determine whether nouns are declined in locale's language. 

This property should remain read-only (no setter function)

\begin{Desc}
\item[Returns:]If nouns are declined \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 991 of file klocale.cpp.\index{KLocale@{KLocale}!formatDate@{formatDate}}
\index{formatDate@{formatDate}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Date (const {\bf QDate} \& {\em p\-Date}, bool {\em short\-Format} = {\tt false}) const}\label{classKLocale_a27}


Returns a string formatted to the current locale's conventions regarding dates. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Date}]The date to be formated. \item[{\em short\-Format}]True for non text dates.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The date as a string \end{Desc}


Definition at line 1193 of file klocale.cpp.

References QString::append(), QString::at(), calendar(), date\-Format(), date\-Format\-Short(), QString::length(), KCalendar\-System::month(), month\-Name(), month\-Name\-Possessive(), QString::unicode(), week\-Day\-Name(), and KCalendar\-System::year().

Referenced by format\-Date\-Time().\index{KLocale@{KLocale}!dateMonthNamePossessive@{dateMonthNamePossessive}}
\index{dateMonthNamePossessive@{dateMonthNamePossessive}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::date\-Month\-Name\-Possessive () const}\label{classKLocale_a28}


Use this to determine whether in dates a possessive form of month name is preferred (\char`\"{}of January\char`\"{} rather than \char`\"{}January\char`\"{}). 

\begin{Desc}
\item[Returns:]If possessive form should be used \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 997 of file klocale.cpp.\index{KLocale@{KLocale}!formatTime@{formatTime}}
\index{formatTime@{formatTime}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Time (const {\bf QTime} \& {\em p\-Time}, bool {\em include\-Secs}, bool {\em is\-Duration}) const}\label{classKLocale_a29}


Returns a string formatted to the current locale's conventions regarding times. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Time}]The time to be formated. \item[{\em include\-Secs}]if true, seconds are included in the output, otherwise only hours and minutes are formatted. \item[{\em is\-Duration}]if true, the given time is a duration, not a clock time. This means \char`\"{}am/pm\char`\"{} shouldn't be displayed.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The time as a string \end{Desc}


Definition at line 1717 of file klocale.cpp.

References QString::at(), QString::length(), QString::strip\-White\-Space(), time\-Format(), translate(), and QString::unicode().

Referenced by format\-Date\-Time(), and format\-Time().\index{KLocale@{KLocale}!formatTime@{formatTime}}
\index{formatTime@{formatTime}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Time (const {\bf QTime} \& {\em p\-Time}, bool {\em include\-Secs} = {\tt false}) const}\label{classKLocale_a30}


Returns a string formatted to the current locale's conventions regarding times. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Time}]The time to be formated. \item[{\em include\-Secs}]if true, seconds are included in the output, otherwise only hours and minutes are formatted.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The time as a string \end{Desc}


Definition at line 1712 of file klocale.cpp.

References format\-Time().\index{KLocale@{KLocale}!use12Clock@{use12Clock}}
\index{use12Clock@{use12Clock}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::use12Clock () const}\label{classKLocale_a31}


Use this to determine if the user wants a 12 hour clock. 

\begin{Desc}
\item[Returns:]If the user wants 12h clock \end{Desc}


Definition at line 1803 of file klocale.cpp.

References time\-Format().\index{KLocale@{KLocale}!weekStartsMonday@{weekStartsMonday}}
\index{weekStartsMonday@{weekStartsMonday}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::week\-Starts\-Monday () const}\label{classKLocale_a32}


\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
Please use the week\-Start\-Day method instead.

Use this to determine if the user wants the week to start on Monday.

\begin{Desc}
\item[Returns:]true if the week starts on Monday \end{Desc}


Definition at line 1009 of file klocale.cpp.\index{KLocale@{KLocale}!weekStartDay@{weekStartDay}}
\index{weekStartDay@{weekStartDay}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KLocale::week\-Start\-Day () const}\label{classKLocale_a33}


Use this to determine which day is the first day of the week. 

\begin{Desc}
\item[Returns:]an integer (Monday=1..Sunday=7) \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 1003 of file klocale.cpp.\index{KLocale@{KLocale}!monthName@{monthName}}
\index{monthName@{monthName}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::month\-Name (int {\em i}, bool {\em short\-Name} = {\tt false}) const}\label{classKLocale_a34}


\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
Returns a string containing the name of the month name used in the Gregorian calendar.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em i}]the month number of the year starting at 1/January. \item[{\em short\-Name}]we will return the short version of the string.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The name of the month\end{Desc}
Typically the correct replacement for this deprecated class is {\bf calendar()}{\rm (p.\,\pageref{classKLocale_a37})}-$>$month\-String(), which requires a {\bf QDate} (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 

\footnotesize\begin{verbatim} #include <kcalendarsystem.h>
\end{verbatim}
\normalsize
 to the applicable file. 

Definition at line 541 of file klocale.cpp.

References translate().

Referenced by format\-Date().\index{KLocale@{KLocale}!monthNamePossessive@{monthNamePossessive}}
\index{monthNamePossessive@{monthNamePossessive}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::month\-Name\-Possessive (int {\em i}, bool {\em short\-Name} = {\tt false}) const}\label{classKLocale_a35}


\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
Returns a string containing the possessive form of the month name used in the Gregorian calendar. (\char`\"{}of January\char`\"{}, \char`\"{}of February\char`\"{}, etc.) It's needed in long format dates in some languages.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em i}]the month number of the year starting at 1/January. \item[{\em short\-Name}]we will return the short version of the string.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The possessive form of the name of the month \end{Desc}
\begin{Desc}
\item[Since:]3.1\end{Desc}
Typically the correct replacement for this deprecated class is {\bf calendar()}{\rm (p.\,\pageref{classKLocale_a37})}-$>${\bf month\-Name\-Possessive()}{\rm (p.\,\pageref{classKLocale_a35})}, which requires a {\bf QDate} (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 

\footnotesize\begin{verbatim} #include <kcalendarsystem.h>
\end{verbatim}
\normalsize
 to the applicable file. 

Definition at line 579 of file klocale.cpp.

References translate().

Referenced by format\-Date().\index{KLocale@{KLocale}!weekDayName@{weekDayName}}
\index{weekDayName@{weekDayName}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::week\-Day\-Name (int {\em i}, bool {\em short\-Name} = {\tt false}) const}\label{classKLocale_a36}


\begin{Desc}
\item[{\bf Deprecated}]use {\bf calendar()}{\rm (p.\,\pageref{classKLocale_a37})}-$>$week\-Day\-Name \end{Desc}
Returns a string containing the name of the week day used in the Gregorian calendar.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em i}]the day number of the week starting at 1/Monday. \item[{\em short\-Name}]we will return the short version of the string.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The name of the day \end{Desc}


Definition at line 617 of file klocale.cpp.

References calendar(), and KCalendar\-System::week\-Day\-Name().

Referenced by format\-Date().\index{KLocale@{KLocale}!calendar@{calendar}}
\index{calendar@{calendar}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KCalendar\-System} $\ast$ KLocale::calendar () const}\label{classKLocale_a37}


Returns a pointer to the calendar system object. 

\begin{Desc}
\item[Returns:]the current calendar system instance \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 2250 of file klocale.cpp.

References KCalendar\-System\-Factory::create().

Referenced by format\-Date(), read\-Date(), and week\-Day\-Name().\index{KLocale@{KLocale}!calendarType@{calendarType}}
\index{calendarType@{calendarType}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::calendar\-Type () const}\label{classKLocale_a38}


Returns the name of the calendar system that is currently being used by the system. 

\begin{Desc}
\item[Returns:]the name of the calendar system \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 2243 of file klocale.cpp.\index{KLocale@{KLocale}!setCalendar@{setCalendar}}
\index{setCalendar@{setCalendar}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Calendar (const {\bf QString} \& {\em calendar\-Type})}\label{classKLocale_a39}


Changes the current calendar system to the calendar specified. 

Currently \char`\"{}gregorian\char`\"{} and \char`\"{}hijri\char`\"{} are supported. If the calendar system specified is not found, gregorian will be used.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em calendar\-Type}]the name of the calendar type \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 2233 of file klocale.cpp.\index{KLocale@{KLocale}!formatDateTime@{formatDateTime}}
\index{formatDateTime@{formatDateTime}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Date\-Time (const {\bf QDate\-Time} \& {\em p\-Date\-Time}, bool {\em short\-Format} = {\tt true}, bool {\em include\-Secs} = {\tt false}) const}\label{classKLocale_a40}


Returns a string formated to the current locale's conventions regarding both date and time. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Date\-Time}]The date and time to be formated. \item[{\em short\-Format}]using the short date format. \item[{\em include\-Secs}]using the short date format.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The date and time as a string \end{Desc}


Definition at line 1822 of file klocale.cpp.

References QString::arg(), format\-Date(), format\-Time(), and translate().\index{KLocale@{KLocale}!readMoney@{readMoney}}
\index{readMoney@{readMoney}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double KLocale::read\-Money (const {\bf QString} \& {\em num\-Str}, bool $\ast$ {\em ok} = {\tt 0}) const}\label{classKLocale_a41}


Converts a localized monetary string to a double. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Str}]the string we want to convert. \item[{\em ok}]the boolean that is set to false if it's not a number. If {\tt ok} is 0, it will be ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The string converted to a double \end{Desc}


Definition at line 1338 of file klocale.cpp.

References currency\-Symbol(), QString::find(), QString::is\-Empty(), QString::left(), QString::length(), QString::mid(), monetary\-Decimal\-Symbol(), monetary\-Thousands\-Separator(), negative\-Monetary\-Sign\-Position(), negative\-Sign(), QString::remove(), QString::strip\-White\-Space(), and QString::to\-Double().\index{KLocale@{KLocale}!readNumber@{readNumber}}
\index{readNumber@{readNumber}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double KLocale::read\-Number (const {\bf QString} \& {\em num\-Str}, bool $\ast$ {\em ok} = {\tt 0}) const}\label{classKLocale_a42}


Converts a localized numeric string to a double. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Str}]the string we want to convert. \item[{\em ok}]the boolean that is set to false if it's not a number. If {\tt ok} is 0, it will be ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The string converted to a double \end{Desc}


Definition at line 1273 of file klocale.cpp.

References decimal\-Symbol(), QString::find(), QString::left(), QString::length(), QString::mid(), negative\-Sign(), QString::remove(), QString::strip\-White\-Space(), thousands\-Separator(), and QString::to\-Double().\index{KLocale@{KLocale}!readDate@{readDate}}
\index{readDate@{readDate}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QDate} KLocale::read\-Date (const {\bf QString} \& {\em str}, bool $\ast$ {\em ok} = {\tt 0}) const}\label{classKLocale_a43}


Converts a localized date string to a {\bf QDate}. 

The bool pointed by ok will be invalid if the date entered was not valid.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]the string we want to convert. \item[{\em ok}]the boolean that is set to false if it's not a valid date. If {\tt ok} is 0, it will be ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The string converted to a {\bf QDate} \end{Desc}


Definition at line 1451 of file klocale.cpp.

References QDate::is\-Valid().

Referenced by read\-Date().\index{KLocale@{KLocale}!readDate@{readDate}}
\index{readDate@{readDate}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QDate} KLocale::read\-Date (const {\bf QString} \& {\em intstr}, const {\bf QString} \& {\em fmt}, bool $\ast$ {\em ok} = {\tt 0}) const}\label{classKLocale_a44}


Converts a localized date string to a {\bf QDate}, using the specified format. 

You will usually not want to use this method. 

Definition at line 1465 of file klocale.cpp.

References QString::at(), calendar(), KCalendar\-System::day\-String\-To\-Integer(), QChar::is\-Space(), QString::length(), QString::lower(), QString::mid(), KCalendar\-System::month\-Name(), KCalendar\-System::month\-Name\-Possessive(), KCalendar\-System::month\-String\-To\-Integer(), KCalendar\-System::set\-YMD(), KCalendar\-System::week\-Day\-Name(), KCalendar\-System::year(), and KCalendar\-System::year\-String\-To\-Integer().\index{KLocale@{KLocale}!readDate@{readDate}}
\index{readDate@{readDate}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QDate} KLocale::read\-Date (const {\bf QString} \& {\em str}, Read\-Date\-Flags {\em flags}, bool $\ast$ {\em ok} = {\tt 0}) const}\label{classKLocale_a45}


Converts a localized date string to a {\bf QDate}. 

This method is stricter than read\-Date(str,\&ok): it will either accept a date in full format or a date in short format, depending on {\tt flags}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]the string we want to convert. \item[{\em flags}]whether the date string is to be in full format or in short format. \item[{\em ok}]the boolean that is set to false if it's not a valid date. If {\tt ok} is 0, it will be ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The string converted to a {\bf QDate} \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1459 of file klocale.cpp.

References date\-Format(), date\-Format\-Short(), and read\-Date().\index{KLocale@{KLocale}!readTime@{readTime}}
\index{readTime@{readTime}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QTime} KLocale::read\-Time (const {\bf QString} \& {\em str}, bool $\ast$ {\em ok} = {\tt 0}) const}\label{classKLocale_a46}


Converts a localized time string to a {\bf QTime}. 

This method will try to parse it with seconds, then without seconds. The bool pointed to by {\tt ok} will be set to false if the time entered was not valid.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]the string we want to convert. \item[{\em ok}]the boolean that is set to false if it's not a valid time. If {\tt ok} is 0, it will be ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The string converted to a {\bf QTime} \end{Desc}


Definition at line 1596 of file klocale.cpp.

References QTime::is\-Valid().\index{KLocale@{KLocale}!readTime@{readTime}}
\index{readTime@{readTime}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QTime} KLocale::read\-Time (const {\bf QString} \& {\em str}, Read\-Time\-Flags {\em flags}, bool $\ast$ {\em ok} = {\tt 0}) const}\label{classKLocale_a47}


Converts a localized time string to a {\bf QTime}. 

This method is stricter than read\-Time(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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]the string we want to convert. \item[{\em flags}]whether the time string is expected to contain seconds or not. \item[{\em ok}]the boolean that is set to false if it's not a valid time. If {\tt ok} is 0, it will be ignored\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The string converted to a {\bf QTime} \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1604 of file klocale.cpp.

References QString::at(), QChar::is\-Space(), QString::length(), QString::lower(), QString::mid(), QString::remove(), QString::simplify\-White\-Space(), time\-Format(), and translate().\index{KLocale@{KLocale}!language@{language}}
\index{language@{language}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::language () const}\label{classKLocale_a48}


Returns the language used by this object. 

The domain AND the library translation must be available in this language. {\bf default\-Language()}{\rm (p.\,\pageref{classKLocale_e3})} is returned by default, if no other available.

\begin{Desc}
\item[Returns:]The currently used language. \end{Desc}


Definition at line 531 of file klocale.cpp.

Referenced by set\-Language(), KConfig\-Base::set\-Locale(), and split\-Locale().\index{KLocale@{KLocale}!country@{country}}
\index{country@{country}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::country () const}\label{classKLocale_a49}


Returns the country code of the country where the user lives. 

{\bf default\-Country()}{\rm (p.\,\pageref{classKLocale_e4})} is returned by default, if no other available.

\begin{Desc}
\item[Returns:]The country code for the user. \end{Desc}


Definition at line 536 of file klocale.cpp.

Referenced by split\-Locale().\index{KLocale@{KLocale}!languagesTwoAlpha@{languagesTwoAlpha}}
\index{languagesTwoAlpha@{languagesTwoAlpha}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KLocale::languages\-Two\-Alpha () const}\label{classKLocale_a50}


Returns the preferred languages as ISO 639-1 codes. 

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).

If the selected languages are \char`\"{}nn, nb, pt\_\-BR\char`\"{}, you will get: \char`\"{}nn, no, nb, pt\char`\"{}.

\begin{Desc}
\item[Returns:]List of language codes\end{Desc}
\begin{Desc}
\item[See also:]{\bf language\-List}{\rm (p.\,\pageref{classKLocale_a51})} \end{Desc}


Definition at line 2151 of file klocale.cpp.

References QString::find(), KConfig\-Base::has\-Key(), language\-List(), KConfig\-Base::read\-List\-Entry(), KConfig\-Base::set\-Group(), and QString::truncate().\index{KLocale@{KLocale}!languageList@{languageList}}
\index{languageList@{languageList}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KLocale::language\-List () const}\label{classKLocale_a51}


Returns the languages selected by user. 

The codes returned here is the internal language codes.

\begin{Desc}
\item[Returns:]List of language codes\end{Desc}
\begin{Desc}
\item[See also:]{\bf languages\-Two\-Alpha}{\rm (p.\,\pageref{classKLocale_a50})} \end{Desc}


Definition at line 1817 of file klocale.cpp.

Referenced by lang\-Lookup(), languages\-Two\-Alpha(), and set\-Language().\index{KLocale@{KLocale}!encoding@{encoding}}
\index{encoding@{encoding}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ KLocale::encoding () const}\label{classKLocale_a52}


Returns the user's preferred encoding. 

\begin{Desc}
\item[Returns:]The name of the preferred encoding\end{Desc}
\begin{Desc}
\item[See also:]{\bf codec\-For\-Encoding}{\rm (p.\,\pageref{classKLocale_a54})} 

{\bf encoding\-Mib}{\rm (p.\,\pageref{classKLocale_a53})} \end{Desc}


Definition at line 2120 of file klocale.cpp.

References codec\-For\-Encoding(), and QText\-Codec::name().\index{KLocale@{KLocale}!encodingMib@{encodingMib}}
\index{encodingMib@{encodingMib}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KLocale::encoding\-Mib () const}\label{classKLocale_a53}


Returns the user's preferred encoding. 

\begin{Desc}
\item[Returns:]The Mib of the preferred encoding\end{Desc}
\begin{Desc}
\item[See also:]{\bf encoding}{\rm (p.\,\pageref{classKLocale_a52})} 

{\bf codec\-For\-Encoding}{\rm (p.\,\pageref{classKLocale_a54})} \end{Desc}


Definition at line 2125 of file klocale.cpp.

References codec\-For\-Encoding(), and QText\-Codec::mib\-Enum().\index{KLocale@{KLocale}!codecForEncoding@{codecForEncoding}}
\index{codecForEncoding@{codecForEncoding}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QText\-Codec} $\ast$ KLocale::codec\-For\-Encoding () const}\label{classKLocale_a54}


Returns the user's preferred encoding. 

Should never be NULL.

\begin{Desc}
\item[Returns:]The codec for the preferred encoding\end{Desc}
\begin{Desc}
\item[See also:]{\bf encoding}{\rm (p.\,\pageref{classKLocale_a52})} 

{\bf encoding\-Mib}{\rm (p.\,\pageref{classKLocale_a53})} \end{Desc}


Definition at line 2137 of file klocale.cpp.

Referenced by KCharsets::codec\-For\-Name(), encoding(), encoding\-Mib(), and file\-Encoding\-Mib().\index{KLocale@{KLocale}!fileEncodingMib@{fileEncodingMib}}
\index{fileEncodingMib@{fileEncodingMib}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KLocale::file\-Encoding\-Mib () const}\label{classKLocale_a55}


Returns the file encoding. 

\begin{Desc}
\item[Returns:]The Mib of the file encoding\end{Desc}
\begin{Desc}
\item[See also:]{\bf QFile::encode\-Name} 

{\bf QFile::decode\-Name} \end{Desc}


Definition at line 2130 of file klocale.cpp.

References codec\-For\-Encoding(), and QText\-Codec::mib\-Enum().\index{KLocale@{KLocale}!setDateFormat@{setDateFormat}}
\index{setDateFormat@{setDateFormat}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Date\-Format (const {\bf QString} \& {\em format})}\label{classKLocale_a56}


Changes the current date format. 

The format of the date is a string which contains variables that will be replaced: \begin{itemize}
\item Y with the century (e.g. \char`\"{}19\char`\"{} for \char`\"{}1984\char`\"{}) \item y with the lower 2 digits of the year (e.g. \char`\"{}84\char`\"{} for \char`\"{}1984\char`\"{}) \item n with the month (January=\char`\"{}1\char`\"{}, December=\char`\"{}12\char`\"{}) \item m with the month with two digits (January=\char`\"{}01\char`\"{}, December=\char`\"{}12\char`\"{}) \item e with the day of the month (e.g. \char`\"{}1\char`\"{} on the first of march) \item d with the day of the month with two digits(e.g. \char`\"{}01\char`\"{} on the first of march) \item b with the short form of the month (e.g. \char`\"{}Jan\char`\"{} for January) \item B with the long form of the month (e.g. \char`\"{}January\char`\"{}) \item a with the short form of the weekday (e.g. \char`\"{}Wed\char`\"{} for Wednesday) \item A with the long form of the weekday (e.g. \char`\"{}Wednesday\char`\"{} for Wednesday) Everything else in the format string will be taken as is. For example, March 20th 1989 with the format \char`\"{}\%y:\%m:\%d\char`\"{} results in \char`\"{}89:03:20\char`\"{}.\end{itemize}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em format}]The new date format \end{description}
\end{Desc}


Definition at line 1951 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!setDateFormatShort@{setDateFormatShort}}
\index{setDateFormatShort@{setDateFormatShort}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Date\-Format\-Short (const {\bf QString} \& {\em format})}\label{classKLocale_a57}


Changes the current short date format. 

The format of the date is a string which contains variables that will be replaced: \begin{itemize}
\item Y with the century (e.g. \char`\"{}19\char`\"{} for \char`\"{}1984\char`\"{}) \item y with the lower 2 digits of the year (e.g. \char`\"{}84\char`\"{} for \char`\"{}1984\char`\"{}) \item n with the month (January=\char`\"{}1\char`\"{}, December=\char`\"{}12\char`\"{}) \item m with the month with two digits (January=\char`\"{}01\char`\"{}, December=\char`\"{}12\char`\"{}) \item e with the day of the month (e.g. \char`\"{}1\char`\"{} on the first of march) \item d with the day of the month with two digits(e.g. \char`\"{}01\char`\"{} on the first of march) \item b with the short form of the month (e.g. \char`\"{}Jan\char`\"{} for January) \item B with the long form of the month (e.g. \char`\"{}January\char`\"{}) \item a with the short form of the weekday (e.g. \char`\"{}Wed\char`\"{} for Wednesday) \item A with the long form of the weekday (e.g. \char`\"{}Wednesday\char`\"{} for Wednesday) Everything else in the format string will be taken as is. For example, March 20th 1989 with the format \char`\"{}\%y:\%m:\%d\char`\"{} results in \char`\"{}89:03:20\char`\"{}.\end{itemize}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em format}]The new short date format \end{description}
\end{Desc}


Definition at line 1957 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!setDateMonthNamePossessive@{setDateMonthNamePossessive}}
\index{setDateMonthNamePossessive@{setDateMonthNamePossessive}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Date\-Month\-Name\-Possessive (bool {\em possessive})}\label{classKLocale_a58}


Changes the form of month name used in dates. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em possessive}]True if possessive forms should be used \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 1963 of file klocale.cpp.\index{KLocale@{KLocale}!setTimeFormat@{setTimeFormat}}
\index{setTimeFormat@{setTimeFormat}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Time\-Format (const {\bf QString} \& {\em format})}\label{classKLocale_a59}


Changes the current time format. 

The format of the time is string a which contains variables that will be replaced: \begin{itemize}
\item H with the hour in 24h format and 2 digits (e.g. 5pm is \char`\"{}17\char`\"{}, 5am is \char`\"{}05\char`\"{}) \item k with the hour in 24h format and one digits (e.g. 5pm is \char`\"{}17\char`\"{}, 5am is \char`\"{}5\char`\"{}) \item I with the hour in 12h format and 2 digits (e.g. 5pm is \char`\"{}05\char`\"{}, 5am is \char`\"{}05\char`\"{}) \item l with the hour in 12h format and one digits (e.g. 5pm is \char`\"{}5\char`\"{}, 5am is \char`\"{}5\char`\"{}) \item M with the minute with 2 digits (e.g. the minute of 07:02:09 is \char`\"{}02\char`\"{}) \item S with the seconds with 2 digits (e.g. the minute of 07:02:09 is \char`\"{}09\char`\"{}) \item p with pm or am (e.g. 17.00 is \char`\"{}pm\char`\"{}, 05.00 is \char`\"{}am\char`\"{}) Everything else in the format string will be taken as is. For example, 5.23pm with the format \char`\"{}\%H:\%M\char`\"{} results in \char`\"{}17:23\char`\"{}.\end{itemize}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em format}]The new time format \end{description}
\end{Desc}


Definition at line 1969 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!setWeekStartsMonday@{setWeekStartsMonday}}
\index{setWeekStartsMonday@{setWeekStartsMonday}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Week\-Starts\-Monday (bool {\em start})}\label{classKLocale_a60}


\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
Please use set\-Week\-Start\-Day instead.

Changes how KLocale defines the first day in week.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start}]True if Monday is the first day in the week \end{description}
\end{Desc}


Definition at line 1975 of file klocale.cpp.\index{KLocale@{KLocale}!setWeekStartDay@{setWeekStartDay}}
\index{setWeekStartDay@{setWeekStartDay}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Week\-Start\-Day (int {\em day})}\label{classKLocale_a61}


Changes how KLocale defines the first day in week. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em day}]first day of the week (Monday=1..Sunday=7) as integer \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 1984 of file klocale.cpp.\index{KLocale@{KLocale}!dateFormat@{dateFormat}}
\index{dateFormat@{dateFormat}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::date\-Format () const}\label{classKLocale_a62}


Returns the currently selected date format. 

\begin{Desc}
\item[Returns:]Current date format. \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Date\-Format()}{\rm (p.\,\pageref{classKLocale_a56})} \end{Desc}


Definition at line 1993 of file klocale.cpp.

Referenced by format\-Date(), and read\-Date().\index{KLocale@{KLocale}!dateFormatShort@{dateFormatShort}}
\index{dateFormatShort@{dateFormatShort}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::date\-Format\-Short () const}\label{classKLocale_a63}


Returns the currently selected short date format. 

\begin{Desc}
\item[Returns:]Current short date format. \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Date\-Format\-Short()}{\rm (p.\,\pageref{classKLocale_a57})} \end{Desc}


Definition at line 1999 of file klocale.cpp.

Referenced by format\-Date(), and read\-Date().\index{KLocale@{KLocale}!timeFormat@{timeFormat}}
\index{timeFormat@{timeFormat}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::time\-Format () const}\label{classKLocale_a64}


Returns the currently selected time format. 

\begin{Desc}
\item[Returns:]Current time format. \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Time\-Format()}{\rm (p.\,\pageref{classKLocale_a59})} \end{Desc}


Definition at line 2005 of file klocale.cpp.

Referenced by format\-Time(), read\-Time(), and use12Clock().\index{KLocale@{KLocale}!setDecimalSymbol@{setDecimalSymbol}}
\index{setDecimalSymbol@{setDecimalSymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Decimal\-Symbol (const {\bf QString} \& {\em symbol})}\label{classKLocale_a65}


Changes the symbol used to identify the decimal pointer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em symbol}]The new decimal symbol. \end{description}
\end{Desc}


Definition at line 2011 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!setThousandsSeparator@{setThousandsSeparator}}
\index{setThousandsSeparator@{setThousandsSeparator}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Thousands\-Separator (const {\bf QString} \& {\em separator})}\label{classKLocale_a66}


Changes the separator used to group digits when formating numbers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em separator}]The new thousands separator. \end{description}
\end{Desc}


Definition at line 2017 of file klocale.cpp.\index{KLocale@{KLocale}!setPositiveSign@{setPositiveSign}}
\index{setPositiveSign@{setPositiveSign}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Positive\-Sign (const {\bf QString} \& {\em sign})}\label{classKLocale_a67}


Changes the sign used to identify a positive number. 

Normally this is left blank.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sign}]Sign used for positive numbers. \end{description}
\end{Desc}


Definition at line 2024 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!setNegativeSign@{setNegativeSign}}
\index{setNegativeSign@{setNegativeSign}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Negative\-Sign (const {\bf QString} \& {\em sign})}\label{classKLocale_a68}


Changes the sign used to identify a negative number. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sign}]Sign used for negative numbers. \end{description}
\end{Desc}


Definition at line 2030 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!setPositiveMonetarySignPosition@{setPositiveMonetarySignPosition}}
\index{setPositiveMonetarySignPosition@{setPositiveMonetarySignPosition}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Positive\-Monetary\-Sign\-Position ({\bf Sign\-Position} {\em signpos})}\label{classKLocale_a69}


Changes the sign position used for positive monetary values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em signpos}]The new sign position \end{description}
\end{Desc}


Definition at line 2036 of file klocale.cpp.\index{KLocale@{KLocale}!setNegativeMonetarySignPosition@{setNegativeMonetarySignPosition}}
\index{setNegativeMonetarySignPosition@{setNegativeMonetarySignPosition}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Negative\-Monetary\-Sign\-Position ({\bf Sign\-Position} {\em signpos})}\label{classKLocale_a70}


Changes the sign position used for negative monetary values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em signpos}]The new sign position \end{description}
\end{Desc}


Definition at line 2042 of file klocale.cpp.\index{KLocale@{KLocale}!setPositivePrefixCurrencySymbol@{setPositivePrefixCurrencySymbol}}
\index{setPositivePrefixCurrencySymbol@{setPositivePrefixCurrencySymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Positive\-Prefix\-Currency\-Symbol (bool {\em prefix})}\label{classKLocale_a71}


Changes the position where the currency symbol should be printed for positive monetary values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prefix}]True if the currency symbol should be prefixed instead of postfixed \end{description}
\end{Desc}


Definition at line 2048 of file klocale.cpp.\index{KLocale@{KLocale}!setNegativePrefixCurrencySymbol@{setNegativePrefixCurrencySymbol}}
\index{setNegativePrefixCurrencySymbol@{setNegativePrefixCurrencySymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Negative\-Prefix\-Currency\-Symbol (bool {\em prefix})}\label{classKLocale_a72}


Changes the position where the currency symbol should be printed for negative monetary values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prefix}]True if the currency symbol should be prefixed instead of postfixed \end{description}
\end{Desc}


Definition at line 2054 of file klocale.cpp.\index{KLocale@{KLocale}!setFracDigits@{setFracDigits}}
\index{setFracDigits@{setFracDigits}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Frac\-Digits (int {\em digits})}\label{classKLocale_a73}


Changes the number of digits used when formating numbers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em digits}]The default number of digits to use. \end{description}
\end{Desc}


Definition at line 2060 of file klocale.cpp.\index{KLocale@{KLocale}!setMonetaryThousandsSeparator@{setMonetaryThousandsSeparator}}
\index{setMonetaryThousandsSeparator@{setMonetaryThousandsSeparator}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Monetary\-Thousands\-Separator (const {\bf QString} \& {\em separator})}\label{classKLocale_a74}


Changes the separator used to group digits when formating monetary values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em separator}]The new thousands separator. \end{description}
\end{Desc}


Definition at line 2066 of file klocale.cpp.\index{KLocale@{KLocale}!setMonetaryDecimalSymbol@{setMonetaryDecimalSymbol}}
\index{setMonetaryDecimalSymbol@{setMonetaryDecimalSymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Monetary\-Decimal\-Symbol (const {\bf QString} \& {\em symbol})}\label{classKLocale_a75}


Changes the symbol used to identify the decimal pointer for monetary values. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em symbol}]The new decimal symbol. \end{description}
\end{Desc}


Definition at line 2073 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!setCurrencySymbol@{setCurrencySymbol}}
\index{setCurrencySymbol@{setCurrencySymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Currency\-Symbol (const {\bf QString} \& {\em symbol})}\label{classKLocale_a76}


Changes the current currency symbol. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em symbol}]The new currency symbol \end{description}
\end{Desc}


Definition at line 2079 of file klocale.cpp.

References QString::strip\-White\-Space().\index{KLocale@{KLocale}!pageSize@{pageSize}}
\index{pageSize@{pageSize}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KLocale::page\-Size () const}\label{classKLocale_a77}


Returns the preferred page size for printing. 

\begin{Desc}
\item[Returns:]The preferred page size, cast it to QPrinter::Page\-Size \end{Desc}


Definition at line 2085 of file klocale.cpp.\index{KLocale@{KLocale}!setPageSize@{setPageSize}}
\index{setPageSize@{setPageSize}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Page\-Size (int {\em paper\-Format})}\label{classKLocale_a78}


Changes the preferred page size when printing. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em paper\-Format}]the new preferred page size in the format QPrinter::Page\-Size \end{description}
\end{Desc}


Definition at line 2091 of file klocale.cpp.\index{KLocale@{KLocale}!measureSystem@{measureSystem}}
\index{measureSystem@{measureSystem}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLocale::Measure\-System} KLocale::measure\-System () const}\label{classKLocale_a79}


Returns which measuring system we use. 

\begin{Desc}
\item[Returns:]The preferred measuring system \end{Desc}


Definition at line 2098 of file klocale.cpp.\index{KLocale@{KLocale}!setMeasureSystem@{setMeasureSystem}}
\index{setMeasureSystem@{setMeasureSystem}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Measure\-System ({\bf Measure\-System} {\em value})}\label{classKLocale_a80}


Changes the preferred measuring system. 

\begin{Desc}
\item[Returns:]value The preferred measuring system \end{Desc}


Definition at line 2104 of file klocale.cpp.\index{KLocale@{KLocale}!insertCatalogue@{insertCatalogue}}
\index{insertCatalogue@{insertCatalogue}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::insert\-Catalogue (const {\bf QString} \& {\em catalog})}\label{classKLocale_a81}


Adds another catalog to search for translation lookup. 

This function is useful for extern libraries and/or code, that provide there own messages.

If the catalog does not exist for the chosen language, it will be ignored and en\_\-US will be used.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em catalog}]The catalog to add. \end{description}
\end{Desc}


Definition at line 622 of file klocale.cpp.

References QString::append().\index{KLocale@{KLocale}!removeCatalogue@{removeCatalogue}}
\index{removeCatalogue@{removeCatalogue}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::remove\-Catalogue (const {\bf QString} \& {\em catalog})}\label{classKLocale_a82}


Removes a catalog for translation lookup. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em catalog}]The catalog to remove. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf insert\-Catalogue()}{\rm (p.\,\pageref{classKLocale_a81})} \end{Desc}


Definition at line 671 of file klocale.cpp.

References QString::remove().\index{KLocale@{KLocale}!setActiveCatalogue@{setActiveCatalogue}}
\index{setActiveCatalogue@{setActiveCatalogue}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Active\-Catalogue (const {\bf QString} \& {\em catalog})}\label{classKLocale_a83}


Sets the active catalog for translation lookup. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em catalog}]The catalog to activate. \end{description}
\end{Desc}


Definition at line 680 of file klocale.cpp.

References QString::prepend(), and QString::remove().

Referenced by KGlobal::set\-Active\-Instance().\index{KLocale@{KLocale}!translateQt@{translateQt}}
\index{translateQt@{translateQt}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::translate\-Qt (const char $\ast$ {\em context}, const char $\ast$ {\em source\-Text}, const char $\ast$ {\em message}) const}\label{classKLocale_a84}


Translates a message as a {\bf QTranslator} is supposed to. 

The parameters are similar to {\bf i18n()}{\rm (p.\,\pageref{classKLocale_m2})}, but the result value has other semantics (it can be QString::null) \begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 947 of file klocale.cpp.

References endl().\index{KLocale@{KLocale}!allLanguagesTwoAlpha@{allLanguagesTwoAlpha}}
\index{allLanguagesTwoAlpha@{allLanguagesTwoAlpha}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KLocale::all\-Languages\-Two\-Alpha () const}\label{classKLocale_a85}


Returns list of all known ISO 639-1 codes. 

\begin{Desc}
\item[Returns:]a list of all language codes \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 2191 of file klocale.cpp.\index{KLocale@{KLocale}!twoAlphaToLanguageName@{twoAlphaToLanguageName}}
\index{twoAlphaToLanguageName@{twoAlphaToLanguageName}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::two\-Alpha\-To\-Language\-Name (const {\bf QString} \& {\em code}) const}\label{classKLocale_a86}


Convert a ISO 639-1 code to a human readable form. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em code}]the language ISO 639-1 code \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the human readable form \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 2199 of file klocale.cpp.

References QString::find(), QString::left(), QString::lower(), and QString::replace().\index{KLocale@{KLocale}!allCountriesTwoAlpha@{allCountriesTwoAlpha}}
\index{allCountriesTwoAlpha@{allCountriesTwoAlpha}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KLocale::all\-Countries\-Two\-Alpha () const}\label{classKLocale_a87}


Returns list of all known country codes. 

\begin{Desc}
\item[Returns:]a list of all country codes \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 2212 of file klocale.cpp.

References KGlobal::dirs(), and KStandard\-Dirs::find\-All\-Resources().\index{KLocale@{KLocale}!twoAlphaToCountryName@{twoAlphaToCountryName}}
\index{twoAlphaToCountryName@{twoAlphaToCountryName}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::two\-Alpha\-To\-Country\-Name (const {\bf QString} \& {\em code}) const}\label{classKLocale_a88}


Convert a country code to a human readable form. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em code}]the country code \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the human readable form of the country name \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 2226 of file klocale.cpp.\index{KLocale@{KLocale}!splitLocale@{splitLocale}}
\index{splitLocale@{splitLocale}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::split\-Locale (const {\bf QString} \& {\em str}, {\bf QString} \& {\em language}, {\bf QString} \& {\em country}, {\bf QString} \& {\em charset})\hspace{0.3cm}{\tt  [static]}}\label{classKLocale_e0}


Returns the parts of the parameter str understood as language setting the format is language\_\-COUNTRY.charset. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]The string to split. \item[{\em language}]This will be set to the language part of the string. \item[{\em country}]This will be set to the country part of the string. \item[{\em charset}]This will be set to the charset part of the string. \end{description}
\end{Desc}


Definition at line 498 of file klocale.cpp.

References country(), QString::find(), language(), QString::mid(), and QString::truncate().\index{KLocale@{KLocale}!setMainCatalogue@{setMainCatalogue}}
\index{setMainCatalogue@{setMainCatalogue}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::set\-Main\-Catalogue (const char $\ast$ {\em catalog})\hspace{0.3cm}{\tt  [static]}}\label{classKLocale_e1}


Use this as main catalog for $\ast$all$\ast$ KLocales, if not the appname will be used. 

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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em catalog}]Catalogue to override all other main catalogues. \end{description}
\end{Desc}


Definition at line 1268 of file klocale.cpp.\index{KLocale@{KLocale}!langLookup@{langLookup}}
\index{langLookup@{langLookup}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::lang\-Lookup (const {\bf QString} \& {\em fname}, const char $\ast$ {\em rtype} = {\tt \char`\"{}html\char`\"{}})\hspace{0.3cm}{\tt  [static]}}\label{classKLocale_e2}


Finds localized resource in resource\-Dir( rtype ) + $<$lang$>$ + fname. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]relative path to find \item[{\em rtype}]resource type to use \end{description}
\end{Desc}


Definition at line 1874 of file klocale.cpp.

References default\-Language(), KGlobal::dirs(), endl(), QFile\-Info::exists(), QFile\-Info::is\-File(), QFile\-Info::is\-Readable(), language\-List(), KGlobal::locale(), and KStandard\-Dirs::resource\-Dirs().\index{KLocale@{KLocale}!defaultLanguage@{defaultLanguage}}
\index{defaultLanguage@{defaultLanguage}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::default\-Language ()\hspace{0.3cm}{\tt  [static]}}\label{classKLocale_e3}


Returns the name of the internal language. 

\begin{Desc}
\item[Returns:]Name of the default language \end{Desc}


Definition at line 2110 of file klocale.cpp.

References QString::from\-Latin1().

Referenced by lang\-Lookup(), set\-Language(), and KConfig\-Base::set\-Locale().\index{KLocale@{KLocale}!defaultCountry@{defaultCountry}}
\index{defaultCountry@{defaultCountry}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::default\-Country ()\hspace{0.3cm}{\tt  [static]}}\label{classKLocale_e4}


Returns the name of the default country. 

\begin{Desc}
\item[Returns:]Name of the default country \end{Desc}


Definition at line 2115 of file klocale.cpp.

References QString::from\-Latin1().\index{KLocale@{KLocale}!formatMoney@{formatMoney}}
\index{formatMoney@{formatMoney}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Money (const {\bf QString} \& {\em num\-Str}) const}\label{classKLocale_a89}


\begin{Desc}
\item[{\bf Deprecated}]use format\-Money(double) \end{Desc}


Definition at line 1160 of file klocale.cpp.

References format\-Money().\index{KLocale@{KLocale}!formatNumber@{formatNumber}}
\index{formatNumber@{formatNumber}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::format\-Number (const {\bf QString} \& {\em num\-Str}) const}\label{classKLocale_a90}


\begin{Desc}
\item[{\bf Deprecated}]use format\-Number(double) \end{Desc}


Definition at line 1188 of file klocale.cpp.

References format\-Number().\index{KLocale@{KLocale}!languages@{languages}}
\index{languages@{languages}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::languages () const}\label{classKLocale_a91}


\begin{Desc}
\item[{\bf Deprecated}]Use {\bf language\-List()}{\rm (p.\,\pageref{classKLocale_a51})} \end{Desc}
\begin{Desc}
\item[Returns:]String containing language codes separated by colons \end{Desc}


Definition at line 1812 of file klocale.cpp.

Referenced by KLocale(), and set\-Language().\index{KLocale@{KLocale}!setCharset@{setCharset}}
\index{setCharset@{setCharset}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLocale::set\-Charset (const {\bf QString} \& {\em charset})}\label{classKLocale_a92}


\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
\begin{Desc}
\item[Returns:]True \end{Desc}


Definition at line 2300 of file klocale.cpp.\index{KLocale@{KLocale}!charset@{charset}}
\index{charset@{charset}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::charset () const}\label{classKLocale_a93}


\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}
\begin{Desc}
\item[See also:]{\bf encoding}{\rm (p.\,\pageref{classKLocale_a52})} \end{Desc}


Definition at line 2301 of file klocale.cpp.

References QString::from\-Latin1().

\subsection{Friends And Related Function Documentation}
\index{KLocale@{KLocale}!I18N_NOOP@{I18N\_\-NOOP}}
\index{I18N_NOOP@{I18N\_\-NOOP}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}I18N\_\-NOOP(x)\hspace{0.3cm}{\tt  [related]}}\label{classKLocale_m0}


I18N\_\-NOOP marks a string to be translated without translating it. 

Do not use this unless you know you need it. {\tt http://developer.kde.org/documentation/other/developer-faq.html\#q2.11.2} 

Definition at line 48 of file klocale.h.\index{KLocale@{KLocale}!I18N_NOOP2@{I18N\_\-NOOP2}}
\index{I18N_NOOP2@{I18N\_\-NOOP2}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}I18N\_\-NOOP2(comment, x)\hspace{0.3cm}{\tt  [related]}}\label{classKLocale_m1}


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. 

Warning: you need to call i18n( comment, string\-Var ) later on, not just i18n( string\-Var ). 

Definition at line 58 of file klocale.h.\index{KLocale@{KLocale}!i18n@{i18n}}
\index{i18n@{i18n}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QString} i18n (const char $\ast$ {\em text})\hspace{0.3cm}{\tt  [related]}}\label{classKLocale_m2}


i18n is the function that does everything you need to translate a string. 

You just wrap around every user visible string a i18n call to get a {\bf QString} with the string in the user's preferred language.

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) 

Definition at line 1831 of file klocale.cpp.

References QString::from\-Utf8(), and KGlobal::locale().\index{KLocale@{KLocale}!i18n@{i18n}}
\index{i18n@{i18n}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QString} i18n (const char $\ast$ {\em comment}, const char $\ast$ {\em text})\hspace{0.3cm}{\tt  [related]}}\label{classKLocale_m3}


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. 

\begin{Desc}
\item[See also:]{\bf translate}{\rm (p.\,\pageref{classKLocale_a4})} \end{Desc}


Definition at line 1839 of file klocale.cpp.

References QString::from\-Utf8(), and KGlobal::locale().\index{KLocale@{KLocale}!i18n@{i18n}}
\index{i18n@{i18n}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QString} i18n (const char $\ast$ {\em singular}, const char $\ast$ {\em plural}, unsigned long {\em n})\hspace{0.3cm}{\tt  [related]}}\label{classKLocale_m4}


If you want to handle plural forms, use this form of i18n. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em singular}]the singular form of the word, for example \char`\"{}file\char`\"{}. \item[{\em plural}]the plural form of the word. Must contain a \char`\"{}\%n\char`\"{} that will be replaced by the number {\tt n}, for example \char`\"{}\%n files\char`\"{} \item[{\em n}]the number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the correct singular or plural for the selected language, depending on n \end{Desc}
\begin{Desc}
\item[See also:]{\bf translate}{\rm (p.\,\pageref{classKLocale_a4})} \end{Desc}


Definition at line 1847 of file klocale.cpp.

References KGlobal::locale().\index{KLocale@{KLocale}!tr2i18n@{tr2i18n}}
\index{tr2i18n@{tr2i18n}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} tr2i18n (const char $\ast$ {\em message}, const char $\ast$ = {\tt 0})\hspace{0.3cm}{\tt  [related]}}\label{classKLocale_m5}


Qt3's uic generates i18n( \char`\"{}msg\char`\"{}, \char`\"{}comment\char`\"{} ) calls which conflict with our i18n method. 

We use uic -tr tr2i18n to redirect to the right {\bf i18n()}{\rm (p.\,\pageref{classKLocale_m2})} function 

Definition at line 103 of file klocale.h.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
klocale.h\item 
klocale.cpp\end{CompactItemize}
