X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e3b313e799ad4ffc5d21d81d33cff186f43cef2..bc253a97e78b2c42b93c1f3cc8e1bcceec68a336:/docs/latex/wx/locale.tex diff --git a/docs/latex/wx/locale.tex b/docs/latex/wx/locale.tex index e550878563..55194a79e2 100644 --- a/docs/latex/wx/locale.tex +++ b/docs/latex/wx/locale.tex @@ -3,12 +3,13 @@ wxLocale class encapsulates all language-dependent settings and is a generalization of the C locale concept. -In wxWindows this class manages message catalogs which contain the translations +In wxWidgets this class manages message catalogs which contain the translations of the strings used to the current language. \perlnote{In wxPerl you can't use the '\_' function name, so the {\tt Wx::Locale} module can export the {\tt gettext} and {\tt gettext\_noop} under any given name. + \begin{verbatim} # this imports gettext ( equivalent to Wx::GetTranslation # and gettext_noop ( a noop ) @@ -22,9 +23,11 @@ the {\tt Wx::Locale} module can export the {\tt gettext} and button = Wx::Button->new( window, -1, gettext( ``Label'' ) ); \end{verbatim} + If you need to translate a lot of strings, then adding gettext( ) around each one is a long task ( that is why \_( ) was introduced ), so just choose a shorter name for gettext: + \begin{verbatim} # use Wx::Locale 'gettext' => 't', @@ -37,7 +40,7 @@ a shorter name for gettext: # ... \end{verbatim} -} +}% \wxheading{Derived from} @@ -558,7 +561,7 @@ language (see \helpref{GetSystemLanguage}{wxlocalegetsystemlanguage}).} \docparam{flags}{Combination of the following: \begin{twocollist}\itemsep=0pt \twocolitem{\windowstyle{wxLOCALE\_LOAD\_DEFAULT}}{Load the message catalog -for the given locale containing the translations of standard wxWindows messages +for the given locale containing the translations of standard wxWidgets messages automatically.} \twocolitem{\windowstyle{wxLOCALE\_CONV\_ENCODING}}{Automatically convert message catalogs to platform's default encoding. Note that it will do only basic @@ -577,7 +580,7 @@ directory prefix when looking for the message catalog files.} platform-specific.} \docparam{bLoadDefault}{May be set to false to prevent loading of the message catalog -for the given locale containing the translations of standard wxWindows messages. +for the given locale containing the translations of standard wxWidgets messages. This parameter would be rarely used in normal circumstances.} \docparam{bConvertEncoding}{May be set to true to do automatic conversion of message