\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=118pt]{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
 \}
\begin{CompactList}\small\item\em Various positions for where to place the positive or negative sign when they are related to a monetary value. \item\end{CompactList}\item 
enum {\bf Measure\-System} \{ {\bf Metric}, 
{\bf Imperial}
 \}
\begin{CompactList}\small\item\em The Metric system will give you information in mm, while the Imperial system will give you information in inches. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KLocale} (const  {\bf QString} \&catalogue, {\bf KConfig} $\ast$config=0)
\begin{CompactList}\small\item\em Constructs a KLocale with the given catalogue name. \item\end{CompactList}\item 
{\bf KLocale} (const  {\bf KLocale} \&rhs)
\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
{\bf KLocale} \& {\bf operator=} (const  {\bf KLocale} \&rhs)
\begin{CompactList}\small\item\em Assignment operator. \item\end{CompactList}\item 
{\bf $\sim$KLocale} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
{\bf QString} {\bf translate} (const  char $\ast$index) const 
\begin{CompactList}\small\item\em Translates the string into the corresponding string in the national language, if available. \item\end{CompactList}\item 
{\bf QString} {\bf translate} (const  char $\ast$index, const  char $\ast$fallback) const 
\begin{CompactList}\small\item\em Translates the string into the corresponding string in the national language, if available. \item\end{CompactList}\item 
{\bf QString} {\bf translate} (const  char $\ast$singular, const  char $\ast$plural, unsigned long n) const 
\begin{CompactList}\small\item\em Used to get the correct, translated singular or plural of a word. \item\end{CompactList}\item 
bool {\bf set\-Charset} (const  {\bf QString} \&charset)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Changes the current charset used for fonts. \item\end{CompactList}\item 
bool {\bf set\-Encoding} (int mib\-Enum)
\begin{CompactList}\small\item\em Changes the current encoding. \item\end{CompactList}\item 
bool {\bf set\-Language} (const  {\bf QString} \&language)
\begin{CompactList}\small\item\em Changes the current language. \item\end{CompactList}\item 
bool {\bf set\-Language} (const  {\bf QString\-List} \&languages)
\begin{CompactList}\small\item\em Changes the list of prefed languages for the locale. \item\end{CompactList}\item 
bool {\bf set\-Country} (const  {\bf QString} \&country)
\begin{CompactList}\small\item\em Changes the current country. \item\end{CompactList}\item 
{\bf QString} {\bf decimal\-Symbol} () const 
\begin{CompactList}\small\item\em Returns what a decimal point should look like (\char`\"{}.\char`\"{} or \char`\"{},\char`\"{} etc.) according to the current locale or user settings. \item\end{CompactList}\item 
{\bf QString} {\bf thousands\-Separator} () const 
\begin{CompactList}\small\item\em Returns what the thousands separator should look like (\char`\"{},\char`\"{} or \char`\"{}.\char`\"{} etc.) according to the current locale or user settings. \item\end{CompactList}\item 
{\bf QString} {\bf currency\-Symbol} () const 
\begin{CompactList}\small\item\em Returns what the symbol denoting currency in the current locale as as defined by user settings should look like. \item\end{CompactList}\item 
{\bf QString} {\bf monetary\-Decimal\-Symbol} () const 
\begin{CompactList}\small\item\em 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. \item\end{CompactList}\item 
{\bf QString} {\bf monetary\-Thousands\-Separator} () const 
\begin{CompactList}\small\item\em 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. \item\end{CompactList}\item 
{\bf QString} {\bf positive\-Sign} () const 
\begin{CompactList}\small\item\em Returns what a positive sign should look like (\char`\"{}+\char`\"{}, \char`\"{} \char`\"{}, etc.) according to the current locale or user settings. \item\end{CompactList}\item 
{\bf QString} {\bf negative\-Sign} () const 
\begin{CompactList}\small\item\em Returns what a negative sign should look like (\char`\"{}-\char`\"{}, etc.) according to the current locale or user settings. \item\end{CompactList}\item 
int {\bf frac\-Digits} () const 
\begin{CompactList}\small\item\em The number of fractional digits to include in numeric/monetary values (usually 2). \item\end{CompactList}\item 
bool {\bf positive\-Prefix\-Currency\-Symbol} () const 
\begin{CompactList}\small\item\em If and only if the currency symbol precedes a positive value, this will be true. \item\end{CompactList}\item 
bool {\bf negative\-Prefix\-Currency\-Symbol} () const 
\begin{CompactList}\small\item\em If and only if the currency symbol precedes a negative value, this will be true. \item\end{CompactList}\item 
{\bf Sign\-Position} {\bf positive\-Monetary\-Sign\-Position} () const 
\begin{CompactList}\small\item\em Returns the position of a positive sign in relation to a monetary value. \item\end{CompactList}\item 
{\bf Sign\-Position} {\bf negative\-Monetary\-Sign\-Position} () const 
\begin{CompactList}\small\item\em Denotes where to place a negative sign in relation to a monetary value. \item\end{CompactList}\item 
{\bf QString} {\bf format\-Money} (double num, const  {\bf QString} \&currency=QString::null, int digits=-1) const 
\begin{CompactList}\small\item\em Given a double, converts that to a numeric string containing the localized monetary equivalent. \item\end{CompactList}\item 
{\bf QString} {\bf format\-Money} (const  {\bf QString} \&num\-Str) const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} This function differs from the above only in that it can take a {\bf QString} as the argument for convenience. \item\end{CompactList}\item 
{\bf QString} {\bf format\-Number} (double num, int precision=-1) const 
\begin{CompactList}\small\item\em Given a double, converts that to a numeric string containing the localized numeric equivalent. \item\end{CompactList}\item 
{\bf QString} {\bf format\-Number} (const  {\bf QString} \&num\-Str) const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} This function differs from the above only in that it can take a {\bf QString} as the argument for convenience. \item\end{CompactList}\item 
bool {\bf noun\-Declension} () const 
\begin{CompactList}\small\item\em Use this to determine whether nouns are declined in locale's language. \item\end{CompactList}\item 
{\bf QString} {\bf format\-Date} (const  {\bf QDate} \&p\-Date, bool short\-Format=false) const 
\begin{CompactList}\small\item\em Returns a string formatted to the current locale's conventions regarding dates. \item\end{CompactList}\item 
bool {\bf date\-Month\-Name\-Possessive} () const 
\begin{CompactList}\small\item\em Use this to determine whether in dates a possessive form of month name is preferred (\char`\"{}of January\char`\"{} rather than \char`\"{}January\char`\"{}). \item\end{CompactList}\item 
{\bf QString} {\bf format\-Time} (const  {\bf QTime} \&p\-Time, bool include\-Secs=false) const 
\begin{CompactList}\small\item\em Returns a string formatted to the current locale's conventions regarding times. \item\end{CompactList}\item 
bool {\bf use12Clock} () const 
\begin{CompactList}\small\item\em Use this to determine if the user wants a 12 hour clock. \item\end{CompactList}\item 
bool {\bf week\-Starts\-Monday} () const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} \item\end{CompactList}\item 
int {\bf week\-Start\-Day} () const 
\begin{CompactList}\small\item\em Use this to determine which day is the first day of the week. \item\end{CompactList}\item 
{\bf QString} {\bf month\-Name} (int i, bool short\-Name=false) const 
\begin{CompactList}\small\item\em Returns a string containing the name of the month name. \item\end{CompactList}\item 
{\bf QString} {\bf month\-Name\-Possessive} (int i, bool short\-Name=false) const 
\begin{CompactList}\small\item\em Returns a string containing the possessive form of the month name. \item\end{CompactList}\item 
{\bf QString} {\bf week\-Day\-Name} (int i, bool short\-Name=false) const 
\begin{CompactList}\small\item\em Returns a string containing the name of the week day. \item\end{CompactList}\item 
{\bf QString} {\bf format\-Date\-Time} (const  {\bf QDate\-Time} \&p\-Date\-Time, bool short\-Format=true, bool include\-Secs=false) const 
\begin{CompactList}\small\item\em Returns a string formated to the current locale's conventions regarding both date and time. \item\end{CompactList}\item 
double {\bf read\-Money} (const  {\bf QString} \&num\-Str, bool $\ast$ok=0) const 
\begin{CompactList}\small\item\em Converts a localized monetary string to a double. \item\end{CompactList}\item 
double {\bf read\-Number} (const  {\bf QString} \&num\-Str, bool $\ast$ok=0) const 
\begin{CompactList}\small\item\em Converts a localized numeric string to a double. \item\end{CompactList}\item 
{\bf QDate} {\bf read\-Date} (const  {\bf QString} \&str, bool $\ast$ok=0) const 
\begin{CompactList}\small\item\em Converts a localized date string to a {\bf QDate}. \item\end{CompactList}\item 
{\bf QDate} {\bf read\-Date} (const  {\bf QString} \&intstr, const  {\bf QString} \&fmt, bool $\ast$ok=0) const 
\begin{CompactList}\small\item\em Converts a localized date string to a {\bf QDate}, using the specified format. \item\end{CompactList}\item 
{\bf QTime} {\bf read\-Time} (const  {\bf QString} \&str, bool $\ast$ok=0) const 
\begin{CompactList}\small\item\em Converts a localized time string to a {\bf QTime}. \item\end{CompactList}\item 
{\bf QString} {\bf language} () const 
\begin{CompactList}\small\item\em Returns the language used by this object. \item\end{CompactList}\item 
{\bf QString} {\bf country} () const 
\begin{CompactList}\small\item\em Returns the country code of the country where the user lives. \item\end{CompactList}\item 
{\bf QString} {\bf languages} () const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Returns the languages selected by user. \item\end{CompactList}\item 
{\bf QString\-List} {\bf languages\-Two\-Alpha} () const 
\begin{CompactList}\small\item\em Returns the preferred languages as ISO 639-1 codes. \item\end{CompactList}\item 
{\bf QString\-List} {\bf language\-List} () const 
\begin{CompactList}\small\item\em Returns the languages selected by user. \item\end{CompactList}\item 
{\bf QString} {\bf charset} () const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Returns the charset name by selected locale. \item\end{CompactList}\item 
const  char $\ast$ {\bf encoding} () const 
\begin{CompactList}\small\item\em Returns the user's preferred encoding. \item\end{CompactList}\item 
int {\bf encoding\-Mib} () const 
\begin{CompactList}\small\item\em Returns the user's preferred encoding. \item\end{CompactList}\item 
{\bf QText\-Codec} $\ast$ {\bf codec\-For\-Encoding} () const 
\begin{CompactList}\small\item\em Returns the user's preferred encoding. \item\end{CompactList}\item 
void {\bf set\-Date\-Format} (const  {\bf QString} \&format)
\begin{CompactList}\small\item\em Changes the current date format. \item\end{CompactList}\item 
void {\bf set\-Date\-Format\-Short} (const  {\bf QString} \&format)
\begin{CompactList}\small\item\em Changes the current short date format. \item\end{CompactList}\item 
void {\bf set\-Date\-Month\-Name\-Possessive} (bool possessive)
\begin{CompactList}\small\item\em Changes the form of month name used in dates. \item\end{CompactList}\item 
void {\bf set\-Time\-Format} (const  {\bf QString} \&format)
\begin{CompactList}\small\item\em Changes the current time format. \item\end{CompactList}\item 
void {\bf set\-Week\-Starts\-Monday} (bool start)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} \item\end{CompactList}\item 
void {\bf set\-Week\-Start\-Day} (int day)
\begin{CompactList}\small\item\em Changes how KLocale defines the first day in week. \item\end{CompactList}\item 
{\bf QString} {\bf date\-Format} () const 
\begin{CompactList}\small\item\em Returns the currently selected date format. \item\end{CompactList}\item 
{\bf QString} {\bf date\-Format\-Short} () const 
\begin{CompactList}\small\item\em Returns the currently selected short date format. \item\end{CompactList}\item 
{\bf QString} {\bf time\-Format} () const 
\begin{CompactList}\small\item\em Returns the currently selected time format. \item\end{CompactList}\item 
void {\bf set\-Decimal\-Symbol} (const  {\bf QString} \&symbol)
\begin{CompactList}\small\item\em Changes the symbol used to identify the decimal pointer. \item\end{CompactList}\item 
void {\bf set\-Thousands\-Separator} (const  {\bf QString} \&separator)
\begin{CompactList}\small\item\em Changes the separator used to group digits when formating numbers. \item\end{CompactList}\item 
void {\bf set\-Positive\-Sign} (const  {\bf QString} \&sign)
\begin{CompactList}\small\item\em Changes the sign used to identify a positive number. \item\end{CompactList}\item 
void {\bf set\-Negative\-Sign} (const  {\bf QString} \&sign)
\begin{CompactList}\small\item\em Changes the sign used to identify a negative number. \item\end{CompactList}\item 
void {\bf set\-Positive\-Monetary\-Sign\-Position} ({\bf Sign\-Position} signpos)
\begin{CompactList}\small\item\em Changes the sign position used for positive monetary values. \item\end{CompactList}\item 
void {\bf set\-Negative\-Monetary\-Sign\-Position} ({\bf Sign\-Position} signpos)
\begin{CompactList}\small\item\em Changes the sign position used for negative monetary values. \item\end{CompactList}\item 
void {\bf set\-Positive\-Prefix\-Currency\-Symbol} (bool prefix)
\begin{CompactList}\small\item\em Changes the position where the currency symbol should be printed for positive monetary values. \item\end{CompactList}\item 
void {\bf set\-Negative\-Prefix\-Currency\-Symbol} (bool prefix)
\begin{CompactList}\small\item\em Changes the position where the currency symbol should be printed for negative monetary values. \item\end{CompactList}\item 
void {\bf set\-Frac\-Digits} (int digits)
\begin{CompactList}\small\item\em Changes the number of digits used when formating numbers. \item\end{CompactList}\item 
void {\bf set\-Monetary\-Thousands\-Separator} (const  {\bf QString} \&separator)
\begin{CompactList}\small\item\em Changes the separator used to group digits when formating monetary values. \item\end{CompactList}\item 
void {\bf set\-Monetary\-Decimal\-Symbol} (const  {\bf QString} \&symbol)
\begin{CompactList}\small\item\em Changes the symbol used to identify the decimal pointer for monetary values. \item\end{CompactList}\item 
void {\bf set\-Currency\-Symbol} (const  {\bf QString} \&symbol)
\begin{CompactList}\small\item\em Changes the current currency symbol. \item\end{CompactList}\item 
int {\bf page\-Size} () const 
\begin{CompactList}\small\item\em Returns the preferred page size for printing. \item\end{CompactList}\item 
void {\bf set\-Page\-Size} (int paper\-Format)
\begin{CompactList}\small\item\em Changes the preferred page size when printing. \item\end{CompactList}\item 
{\bf Measure\-System} {\bf measure\-System} () const 
\begin{CompactList}\small\item\em Returns which measuring system we use. \item\end{CompactList}\item 
void {\bf set\-Measure\-System} ({\bf Measure\-System} value)
\begin{CompactList}\small\item\em Changes the preferred measuring system. \item\end{CompactList}\item 
void {\bf insert\-Catalogue} (const  {\bf QString} \&catalogue)
\begin{CompactList}\small\item\em Adds another catalogue to search for translation lookup. \item\end{CompactList}\item 
void {\bf remove\-Catalogue} (const  {\bf QString} \&catalogue)
\begin{CompactList}\small\item\em Removes a catalog for translation lookup. \item\end{CompactList}\item 
void {\bf set\-Active\-Catalogue} (const  {\bf QString} \&catalogue)
\begin{CompactList}\small\item\em Sets the active catalog for translation lookup. \item\end{CompactList}\item 
{\bf QString} {\bf translate\-Qt} (const  char $\ast$context, const  char $\ast$source\-Text, const  char $\ast$message) const 
\begin{CompactList}\small\item\em Translates a message as a {\bf QTranslator} is supposed to. \item\end{CompactList}\item 
{\bf QString\-List} {\bf all\-Languages\-Two\-Alpha} () const 
\begin{CompactList}\small\item\em Returns list of all known ISO 639-1 codes. \item\end{CompactList}\item 
{\bf QString} {\bf two\-Alpha\-To\-Language\-Name} (const  {\bf QString} \&code) const 
\begin{CompactList}\small\item\em Convert a ISO 639-1 code to a human readable form. \item\end{CompactList}\item 
{\bf QString\-List} {\bf all\-Countries\-Two\-Alpha} () const 
\begin{CompactList}\small\item\em Returns list of all known country codes. \item\end{CompactList}\item 
{\bf QString} {\bf two\-Alpha\-To\-Country\-Name} (const  {\bf QString} \&code) const 
\begin{CompactList}\small\item\em Convert a country code to a human readable form. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf split\-Locale} (const  {\bf QString} \&str, {\bf QString} \&language, {\bf QString} \&country, {\bf QString} \&charset)
\begin{CompactList}\small\item\em Returns the parts of the parameter str understood as language setting the format is language\_\-COUNTRY.charset. \item\end{CompactList}\item 
void {\bf set\-Main\-Catalogue} (const  char $\ast$catalogue)
\begin{CompactList}\small\item\em Use this to as main catalogue for $\ast$all$\ast$ KLocales, if not the appname will be used. \item\end{CompactList}\item 
{\bf QString} {\bf lang\-Lookup} (const  {\bf QString} \&fname, const  char $\ast$rtype=\char`\"{}html\char`\"{})
\begin{CompactList}\small\item\em Finds localized resource in resource\-Dir( rtype ) +  + fname. \item\end{CompactList}\item 
{\bf QString} {\bf default\-Language} ()
\begin{CompactList}\small\item\em Returns the name of the internal language. \item\end{CompactList}\item 
{\bf QString} {\bf default\-Country} ()
\begin{CompactList}\small\item\em Returns the name of the default country. \item\end{CompactList}\item 
{\bf QString} {\bf \_\-init\-Language} ({\bf KConfig\-Base} $\ast$config)\label{classKLocale_e5}

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

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

\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 92 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_w7}


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



Definition at line 246 of file klocale.h.

Referenced by negative\-Monetary\-Sign\-Position(), and positive\-Monetary\-Sign\-Position().\index{KLocale@{KLocale}!MeasureSystem@{MeasureSystem}}
\index{MeasureSystem@{MeasureSystem}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KLocale::Measure\-System}}\label{classKLocale_w8}


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



Definition at line 873 of file klocale.h.

Referenced by measure\-System().

\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 catalogue}, {\bf KConfig} $\ast$ {\em config} = 0)}\label{classKLocale_a0}


Constructs a KLocale with the given catalogue 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 fie. If we were not able to use non 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 catalogue}]The name of the main language file \item[{\em config}]The configuration file to use. \end{description}
\end{Desc}


Definition at line 70 of file klocale.cpp.

References KInstance::config(), KGlobal::instance(), and QString::is\-Empty().\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 2087 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 600 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 2094 of file klocale.cpp.

References d, m\_\-country, m\_\-currency\-Symbol, m\_\-date\-Format, m\_\-date\-Format\-Short, m\_\-decimal\-Symbol, m\_\-frac\-Digits, m\_\-language, m\_\-monetary\-Decimal\-Symbol, m\_\-monetary\-Thousands\-Separator, m\_\-negative\-Monetary\-Sign\-Position, m\_\-negative\-Prefix\-Currency\-Symbol, m\_\-negative\-Sign, m\_\-positive\-Monetary\-Sign\-Position, m\_\-positive\-Prefix\-Currency\-Symbol, m\_\-positive\-Sign, m\_\-thousands\-Separator, and m\_\-time\-Format.\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 catalogue 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 640 of file klocale.cpp.

Referenced by format\-Date\-Time(), format\-Time(), month\-Name(), month\-Name\-Possessive(), and 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 index}, 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 i18n()

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]The lookup text \item[{\em fallback}]the default text, if not found \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]translation \end{Desc}


Definition at line 645 of file klocale.cpp.

References 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 \par
, 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 681 of file klocale.cpp.

References QString::find(), QString::from\-Utf8(), QString::is\-Empty(), and QString\-List::split().\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_a7}


{\bf This class or method is obsolete, it is provided for compatibility only.} Changes the current charset used for fonts. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em charset}]The new charset\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True on success. \end{Desc}
\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_a8}


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 1999 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_a9}


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 378 of file klocale.cpp.

Referenced by set\-Language().\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_a10}


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 392 of file klocale.cpp.

References default\-Language(), language\-List(), and set\-Language().\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_a11}


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 335 of file klocale.cpp.

References QString::is\-Empty().\index{KLocale@{KLocale}!decimalSymbol@{decimalSymbol}}
\index{decimalSymbol@{decimalSymbol}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::decimal\-Symbol () const}\label{classKLocale_a12}


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 896 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_a13}


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 902 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_a14}


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 908 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_a15}


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 914 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_a16}


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 920 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_a17}


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 926 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_a18}


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 932 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_a19}


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 938 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_a20}


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 944 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_a21}


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 950 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_a22}


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_w7})} \end{Desc}


Definition at line 956 of file klocale.cpp.

References Sign\-Position.

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_a23}


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_w7})} \end{Desc}


Definition at line 962 of file klocale.cpp.

References Sign\-Position.

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} = QString::null, int {\em digits} = -1) const}\label{classKLocale_a24}


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_a19})} \end{Desc}


Definition at line 980 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}!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_a25}


{\bf This class or method is obsolete, it is provided for compatibility only.} This function differs from the above only in that it can take a {\bf QString} as the argument for convenience. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Str}]The string you want to reformat.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The number of money as a localized string \end{Desc}


Definition at line 1041 of file klocale.cpp.

References format\-Money(), and QString::to\-Double().\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} = -1) const}\label{classKLocale_a26}


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

e.g. given 123456.78, 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 1046 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\-Number().\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_a27}


{\bf This class or method is obsolete, it is provided for compatibility only.} This function differs from the above only in that it can take a {\bf QString} as the argument for convenience. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num\-Str}]The string you want to convert.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The number as a formated string \end{Desc}


Definition at line 1064 of file klocale.cpp.

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


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 872 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} = false) const}\label{classKLocale_a29}


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 1069 of file klocale.cpp.

References QString::at(), date\-Format(), date\-Format\-Short(), QDate::day(), QDate::day\-Of\-Week(), QString::length(), QDate::month(), month\-Name(), month\-Name\-Possessive(), week\-Day\-Name(), and QDate::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_a30}


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 878 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} = false) const}\label{classKLocale_a31}


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 1584 of file klocale.cpp.

References QString::at(), QTime::hour(), QString::length(), QTime::minute(), QTime::second(), time\-Format(), and translate().

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


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 1663 of file klocale.cpp.

References QString::contains(), QString::from\-Latin1(), and 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_a33}


{\bf This class or method is obsolete, it is provided for compatibility only.} 

Please use the {\bf week\-Start\-Day}{\rm (p.\,\pageref{classKLocale_a34})} 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 890 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_a34}


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 884 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} = false) const}\label{classKLocale_a35}


Returns a string containing the name of the month name. 

\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}


Definition at line 463 of file klocale.cpp.

References translate().

Referenced by format\-Date(), and read\-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} = false) const}\label{classKLocale_a36}


Returns a string containing the possessive form of the month name. 

(\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}


Definition at line 501 of file klocale.cpp.

References translate().

Referenced by format\-Date(), and read\-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} = false) const}\label{classKLocale_a37}


Returns a string containing the name of the week day. 

\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 539 of file klocale.cpp.

References translate().

Referenced by format\-Date(), and read\-Date().\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} = true, bool {\em include\-Secs} = false) const}\label{classKLocale_a38}


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\-Seconds}]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 1682 of file klocale.cpp.

References QString::arg(), QDate\-Time::date(), format\-Date(), format\-Time(), QDate\-Time::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} = 0) const}\label{classKLocale_a39}


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 1217 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} = 0) const}\label{classKLocale_a40}


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 1152 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} = 0) const}\label{classKLocale_a41}


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 1331 of file klocale.cpp.

References QDate::is\-Valid().\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} = 0) const}\label{classKLocale_a42}


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 1345 of file klocale.cpp.

References QString::at(), QDate::current\-Date(), QChar::is\-Space(), QString::length(), QString::lower(), QString::mid(), month\-Name(), month\-Name\-Possessive(), QString::simplify\-White\-Space(), and week\-Day\-Name().\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} = 0) const}\label{classKLocale_a43}


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

The bool pointed by ok will be 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 1471 of file klocale.cpp.

References QTime::is\-Valid().\index{KLocale@{KLocale}!language@{language}}
\index{language@{language}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::language () const}\label{classKLocale_a44}


Returns the language used by this object. 

The domain AND the library translation must be available in this language. \char`\"{}en\_\-US\char`\"{} is default, if no other available.

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


Definition at line 453 of file klocale.cpp.

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


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

\char`\"{}C\char`\"{} is default, if no other available

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


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


{\bf This class or method is obsolete, it is provided for compatibility only.} Returns the languages selected by user. 

\begin{Desc}
\item[Returns:]String containing language codes separated by colons \end{Desc}


Definition at line 1672 of file klocale.cpp.

References QString::from\-Latin1().\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_a47}


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_a48})} \end{Desc}


Definition at line 2008 of file klocale.cpp.

References QString::find(), QString::from\-Latin1(), 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_a48}


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_a47})} \end{Desc}


Definition at line 1677 of file klocale.cpp.

Referenced by lang\-Lookup(), languages\-Two\-Alpha(), and set\-Language().\index{KLocale@{KLocale}!charset@{charset}}
\index{charset@{charset}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLocale::charset () const}\label{classKLocale_a49}


{\bf This class or method is obsolete, it is provided for compatibility only.} Returns the charset name by selected locale. 

This will be the charset defined in the config file. NOTE: This is no longer the same as encoding. \char`\"{}iso-8859-1\char`\"{} is default

\begin{Desc}
\item[Returns:]Name of the preferred charset for fonts\end{Desc}
\begin{Desc}
\item[See also:]{\bf encoding}{\rm (p.\,\pageref{classKLocale_a50})} \end{Desc}
\index{KLocale@{KLocale}!encoding@{encoding}}
\index{encoding@{encoding}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const  char $\ast$ KLocale::encoding () const}\label{classKLocale_a50}


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_a52})} 

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


Definition at line 1984 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_a51}


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_a50})} 

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


Definition at line 1989 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_a52}


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_a50})} 

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


Definition at line 1994 of file klocale.cpp.

Referenced by KCharsets::codec\-For\-Name(), encoding(), and encoding\-Mib().\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_a53}


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 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 1815 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_a54}


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 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 1821 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_a55}


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 1827 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_a56}


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 1833 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_a57}


{\bf This class or method is obsolete, it is provided for compatibility only.} 

Please use {\bf set\-Week\-Start\-Day}{\rm (p.\,\pageref{classKLocale_a58})} 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 1839 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_a58}


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 1848 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_a59}


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_a53})} \end{Desc}


Definition at line 1857 of file klocale.cpp.

Referenced by format\-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_a60}


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_a54})} \end{Desc}


Definition at line 1863 of file klocale.cpp.

Referenced by format\-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_a61}


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_a56})} \end{Desc}


Definition at line 1869 of file klocale.cpp.

Referenced by format\-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_a62}


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 1875 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_a63}


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 1881 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_a64}


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 1888 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_a65}


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 1894 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_a66}


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 1900 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_a67}


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 1906 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_a68}


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 1912 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_a69}


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 1918 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_a70}


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 1924 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_a71}


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 1930 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_a72}


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 1937 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_a73}


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 1943 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_a74}


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 1949 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_a75}


Changes the preferred page size when printing. 

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


Definition at line 1955 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_a76}


Returns which measuring system we use. 

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


Definition at line 1962 of file klocale.cpp.

References Measure\-System.\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_a77}


Changes the preferred measuring system. 

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


Definition at line 1968 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 catalogue})}\label{classKLocale_a78}


Adds another catalogue to search for translation lookup. 

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

If the catalogue 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 catalogue}]The catalogue to add. \end{description}
\end{Desc}


Definition at line 567 of file klocale.cpp.\index{KLocale@{KLocale}!removeCatalogue@{removeCatalogue}}
\index{removeCatalogue@{removeCatalogue}!KLocale@{KLocale}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLocale::remove\-Catalogue (const {\bf QString} \& {\em catalogue})}\label{classKLocale_a79}


Removes a catalog for translation lookup. 

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


Definition at line 576 of file klocale.cpp.\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 catalogue})}\label{classKLocale_a80}


Sets the active catalog for translation lookup. 

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


Definition at line 587 of file klocale.cpp.

References KStd\-Action::save().

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_a81}


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

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


Definition at line 828 of file klocale.cpp.\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_a82}


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 2048 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_a83}


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 2056 of file klocale.cpp.

References QString::lower().\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_a84}


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 2065 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_a85}


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 2079 of file klocale.cpp.

References QString::lower(), KConfig\-Base::read\-Entry(), and KConfig\-Base::set\-Group().\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 420 of file klocale.cpp.

References QString::find(), 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 catalogue})\hspace{0.3cm}{\tt  [static]}}\label{classKLocale_e1}


Use this to as main catalogue 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 (and this is in common {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} applications quite early).

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


Definition at line 1147 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} = \char`\"{}html\char`\"{})\hspace{0.3cm}{\tt  [static]}}\label{classKLocale_e2}


Finds localized resource in resource\-Dir( rtype ) +  + 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 1734 of file klocale.cpp.

References default\-Language(), KGlobal::dirs(), 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 1974 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 1979 of file klocale.cpp.

References QString::from\-Latin1().

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