X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc2171bd4c660b8554dae2a1cbf34ff09f3032a6..af7e4f87c9c1d8c6b68f80da2b08b004e0dcdea4:/docs/latex/wx/ti18n.tex
diff --git a/docs/latex/wx/ti18n.tex b/docs/latex/wx/ti18n.tex
index 156c754bfb..a112b1e958 100644
--- a/docs/latex/wx/ti18n.tex
+++ b/docs/latex/wx/ti18n.tex
@@ -1,10 +1,10 @@
\section{Internationalization}\label{internationalization}
Although internationalization of an application (i18n for short) involves far
-more than just translating its text messages to another message -- date, time and
+more than just translating its text messages to another message - date, time and
currency formats need changing too, some languages are written left to right
and others right to left, character encoding may differ and many other things
-may need changing too -- it is a necessary first step. wxWidgets provides
+may need changing too - it is a necessary first step. wxWidgets provides
facilities for message translation with its
\helpref{wxLocale}{wxlocale} class and is itself fully translated into several
languages. Please consult wxWidgets home page for the most up-to-date
@@ -32,14 +32,14 @@ The program i18n involves several steps:
\begin{enumerate}\itemsep=0pt
\item Translating the strings in the program text using
\helpref{wxGetTranslation}{wxgettranslation} or equivalently the
-\helpref{\_()}{underscore} and \helpref{ngettext}{ngettext} macros.
+\helpref{\_()}{underscore} macro.
\item Extracting the strings to be translated from the program: this uses the
work done in the previous step because {\tt xgettext} program used for string
extraction recognises the standard \_() as well as (using its {\tt -k} option)
our wxGetTranslation and extracts all strings inside the calls to these
functions. Alternatively, you may use {\tt -a} option to extract all the
strings, but it will usually result in many strings being found which don't
-have to be translated at all. This will create a text message catalog -- a .po
+have to be translated at all. This will create a text message catalog - a .po
file.
\item Translating the strings extracted in the previous step to other
language(s). It involves editing the .po file.
@@ -48,6 +48,31 @@ language(s). It involves editing the .po file.
given language: see \helpref{wxLocale}{wxlocale}.
\end{enumerate}
+If you want your app to run under MacOS X with internationlization as
+described above you'll need to make one modification to the Info.plist
+file which describes the contents of the "application bundle". This
+file (an XML text file in UTF-8 format) should have a
+CFBundleDevelopmentRegion entry describing the language of the developer
+- mostly English - and normally MacOS X will query the bundle for the
+presence of certain resource directories to find out which languages
+are supported (e.g. the directory German.lproj for German).
+Since wxWidgets based applications don't use these directories
+for storing resource information (they store the translation in the
+mo files instead) the application needs to be told explicitly which
+langauges are supported. This is done by adding a CFBundleLocalizations
+entry to Info.plist. This can look like this:
+
+\begin{verbatim}
+ CFBundleDevelopmentRegion
+ English
+ CFBundleLocalizations
+
+ en
+ de
+ fr
+
+\end{verbatim}
+
See also the GNU gettext documentation linked from {\tt docs/html/index.htm} in
your wxWidgets distribution.