In wxWindows this class manages message catalogs which contain the translations
of the strings used to the current language.
+\perlnote{In wxPerl the {\tt Wx} module exports a '_' function
+that corresponds to the '_' C++ macro.
+\begin{verbatim}
+ use Wx qw(_);
+
+ # ....
+
+ print _( ``Panic!'' );
+
+ my( \$button ) = Wx::Button->new( \$window, -1, _( ``Label'' ) );
+\end{verbatim}
+}
+
\wxheading{Derived from}
No base class
conversion between well-known pair like iso8859-1 and windows-1252 or
iso8859-2 and windows-1250.
See \helpref{Writing non-English applications}{nonenglishoverview} for detailed
-description about this behaviour.
+description of this behaviour.
\end{itemize}
The call of this function has several global side effects which you should
set locale is restored and so the changes described in
\helpref{Init}{wxlocaleinit} documentation are rolled back.
-\membersection{wxLocale::GetLocale}\label{wxlocalegetlocale}
-
-\constfunc{const char*}{GetLocale}{\void}
-
-Returns the locale name as passed to the constructor or
-\helpref{Init()}{wxlocaleinit}.
-
\membersection{wxLocale::AddCatalog}\label{wxlocaleaddcatalog}
\func{bool}{AddCatalog}{\param{const char }{*szDomain}}
-Add a catalog for use with the current locale: it's searched for in standard
+Add a catalog for use with the current locale: it is searched for in standard
places (current directory first, then the system one), but you may also prepend
additional directories to the search path with
\helpref{AddCatalogLookupPathPrefix()}{wxlocaleaddcataloglookuppathprefix}.
This only applies to subsequent invocations of AddCatalog()!
+\membersection{wxLocale::GetLocale}\label{wxlocalegetlocale}
+
+\constfunc{const char*}{GetLocale}{\void}
+
+Returns the locale name as passed to the constructor or
+\helpref{Init()}{wxlocaleinit}.
+
+\membersection{wxLocale::GetName}\label{wxlocalegetname}
+
+\constfunc{const wxString\&}{GetName}{\void}
+
+Returns the current short name for the locale (as given to the constructor or
+the Init() function).
+
+\membersection{wxLocale::GetString}\label{wxlocalegetstring}
+
+\constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szDomain = NULL}}
+
+Retrieves the translation for a string in all loaded domains unless the szDomain
+parameter is specified (and then only this catalog/domain is searched).
+
+Returns original string if translation is not available
+(in this case an error message is generated the first time
+a string is not found; use \helpref{wxLogNull}{wxlogoverview} to suppress it).
+
+\wxheading{Remarks}
+
+Domains are searched in the last to first order, i.e. catalogs
+added later override those added before.
+
\membersection{wxLocale::Init}\label{wxlocaleinit}
-\func{bool}{Init}{\param{const char }{*szName}, \param{const char }{*szShort = NULL}, \param{const char }{*szLocale = NULL}, \param{bool }{bLoadDefault = TRUE}}
+\func{bool}{Init}{\param{const char }{*szName}, \param{const char }{*szShort = NULL}, \param{const char }{*szLocale = NULL}, \param{bool }{bLoadDefault = TRUE}, \param{bool }{bConvertEncoding = FALSE}}
The parameters have the following meaning:
\item bLoadDefault may be set to FALSE to prevent loading of the message catalog
for the given locale containing the translations of standard wxWindows messages.
This parameter would be rarely used in normal circumstances.
+\item bConvertEncoding may be set to TRUE to do automatic conversion of message
+catalogs to platform's native encoding. Note that it will do only basic
+conversion between well-known pair like iso8859-1 and windows-1252 or
+iso8859-2 and windows-1250.
+See \helpref{Writing non-English applications}{nonenglishoverview} for detailed
+description of this behaviour.
\end{itemize}
The call of this function has several global side effects which you should
See also: \helpref{AddCatalog}{wxlocaleaddcatalog}
-\membersection{wxLocale::GetName}\label{wxlocalegetname}
+\membersection{wxLocale::IsOk}\label{wxlocaleisok}
-\constfunc{const wxString\&}{GetName}{\void}
+\constfunc{bool}{IsOk}{\void}
-Returns the current short name for the locale (as given to the constructor or
-the Init() function).
-
-\membersection{wxLocale::GetString}\label{wxlocalegetstring}
-
-\constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szDomain = NULL}}
-
-Retrieves the translation for a string in all loaded domains unless the szDomain
-parameter is specified (and then only this catalog/domain is searched).
-
-Returns original string if translation is not available
-(in this case an error message is generated the first time
-a string is not found; use \helpref{wxLogNull}{wxlogoverview} to suppress it).
-
-\wxheading{Remarks}
-
-Domains are searched in the last to first order, i.e. catalogs
-added later override those added before.
+Returns TRUE if the locale could be set successfully.