X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dceb1c097c8c24b398f48b482220c358bc7b4db4..097119648b492237f16acdf484eff8900c7c94d2:/docs/latex/wx/ti18n.tex diff --git a/docs/latex/wx/ti18n.tex b/docs/latex/wx/ti18n.tex index a112b1e958..1b586dd4f0 100644 --- a/docs/latex/wx/ti18n.tex +++ b/docs/latex/wx/ti18n.tex @@ -9,13 +9,13 @@ 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 translations - and if you translate it into one of the languages not done -yet, your translations would be gratefully accepted for inclusion into the -future versions of the library! +yet, your translations would be gratefully accepted for inclusion into future +versions of the library! -The wxWidgets approach to i18n closely follows GNU gettext package. wxWidgets uses the +The wxWidgets approach to i18n closely follows the GNU gettext package. wxWidgets uses the message catalogs which are binary compatible with gettext catalogs and this allows to use all of the programs in this package to work with them. But note -that no additional libraries are needed during the run-time, however, so you +that no additional libraries are needed during run-time, however, so you have only the message catalogs to distribute and nothing else. During program development you will need the gettext package for @@ -44,41 +44,31 @@ file. \item Translating the strings extracted in the previous step to other language(s). It involves editing the .po file. \item Compiling the .po file into .mo file to be used by the program. +\item Installing the .mo files with your application in the appropriate +location for the target system which is the one returned by +\helpref{wxStandardPaths::GetLocalizedResourcesDir(wxStandardPaths::ResourceCat\_Messages)}{wxstandardpathsgetlocalizedresourcesdir}. +If the message catalogs are not installed in this default location you may +explicitly use \helpref{AddCatalogLookupPathPrefix()}{wxlocaleaddcataloglookuppathprefix} to +still allow wxWidgets to find them but it is strongly recommended to use the +default directory. \item Setting the appropriate locale in your program to use the strings for the 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. +See also the \urlref{GNU gettext documentation}{http://www.gnu.org/software/gettext/manual/gettext.html}. See also \helpref{Writing non-English applications}{nonenglishoverview}. It focuses on handling charsets related problems. Finally, take a look at the \helpref{i18n sample}{sampleinternat} which shows -to you how all this looks in practice. +you how all this looks in practice. + +\wxheading{Translating menu accelerators} + +If you translate the accelerator modifier names (Ctrl, Alt and Shift) in your menu labels, you may find +the accelerators no longer work. In your message catalogs, you need to provide individual translations +of these modifiers from their lower case names (ctrl, alt, shift) so that the wxWidgets accelerator +code can recognise them even when translated. wxWidgets does not provide translations for all of these +currently. wxWidgets does not yet handle translated special key names such as Backspace, +End, Insert, etc.