wxWidgets/samples/internat
Vadim Zeitlin e709239889 Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks.
Add a special symbol which is defined only if the icons and other images (e.g.
cursor) are in the separate resource files and don't need to be embedded as
XPMs in the main program.

This makes the checks more clear and more customizable as it's enough to
change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform
checks.

Closes #14050.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 00:28:58 +00:00
..
ar Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
bg Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
cs Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
de Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
fr Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
it Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
ja Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
ja_JP.EUC-JP Fixed mismatch in amount of format specifiers in Japanese translation for i18n sample. 2012-01-21 00:01:00 +00:00
ka Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
pl Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
ru Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
sv Removed ellipsis from "About..." occurrences. 2012-01-20 16:51:09 +00:00
internat_vc7.vcproj Rebake everything using bakefile 0.2.9. 2011-02-03 15:02:45 +00:00
internat_vc8.vcproj Rebake all project files to reflect MSVC deprecation warnings defines. 2012-02-07 21:38:09 +00:00
internat_vc9.vcproj Rebake all project files to reflect MSVC deprecation warnings defines. 2012-02-07 21:38:09 +00:00
internat.bkl Remove unnecessary mondrian.{ico,xpm} files from samples directory. 2010-06-20 17:42:33 +00:00
internat.cpp Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks. 2012-03-04 00:28:58 +00:00
internat.dsp Rebake everything using bakefile 0.2.9. 2011-02-03 15:02:45 +00:00
makefile.bcc Always link with expat in monolithic build. 2011-12-25 13:28:01 +00:00
makefile.gcc Always link with expat in monolithic build. 2011-12-25 13:28:01 +00:00
Makefile.in Use /bin/echo for creation of Mac OS X PkgInfo files. 2012-02-28 22:48:39 +00:00
makefile.unx Remove wxMGL port. 2012-01-15 14:46:41 +00:00
makefile.vc Avoid CRT deprecation warnings for MSVC build using makefiles too. 2012-02-07 21:38:31 +00:00
makefile.vms
makefile.wat Always link with expat in monolithic build. 2011-12-25 13:28:01 +00:00
readme.txt update italian translation; add a Q+A for updating an existing internat translation 2009-02-08 15:33:18 +00:00

This is the README file for the internationalization sample for wxWidgets.

Q. What does this stupid program do?
A. It demonstrates how to translate all program messages to a foreign language.
   In any program using wxWidgets there is going to be 3 kinds of messages: the
   messages from the program itself, the messages from the wxWidgets library and
   the messages from the system (e.g. system error messages). This program
   translates the first 2 kinds of messages but the system messages will be only
   translated if your system supports it.

   Brief usage summary: "Test|File" tries to open a non existing file (provoking
   system error message), "Test|Play" shows a message box asking for a number.
   Hint: try some special values like 9 and 17.

Q. Why the error message when I try to open a non existing file is only partly
   translated?
A. Your system doesn't have the translation in the language you use, sorry.

Q. Why the message when I enter '9' is not translated?
A. This is on purpose: the corresponding string wasn't enclosed in _() macro and
   so didn't get into the message catalog when it was created using xgettext.

Q. Why the message when I enter '17' is only partly translated?
A. This will only work under some versions of Linux, don't worry if the second
   half of the sentence is not translated.

Q. I don't speak french, what about translations to <language>?
A. Please write them - see the next question. French is chosen by default
   because it's the only translation which is currently available. To test
   translations to the other languages please run the sample with 2 command line
   arguments: the full language name and the name of the directory where the
   message catalogs for this language are (will be taken as 2 first letters of
   the language name if only 1 argument is given).

Q. How to do translations to other language?
A. First of all, you will need the GNU gettext tools (see the next questions).
   After you've probably installed them, type the following (example is for Unix
   and you should do exactly the same under Windows).

   # all translations forgiven language should be in a separate directory.
   # Please use the standard abbreviation for the language names!
   mkdir <language>
   cd <language>

   # generate the .po file for the program itself
   # see `xgettext --help' for options, "-C" is important!
   xgettext -C -n -k_ -kwxPLURAL:1,2 -kwxTRANSLATE -o internat.po ../internat.cpp

   # .po file for wxWidgets might be generated in the same way. An already
   # generated wxstd.pot as well as translations for some languages can be
   # found in the locale directory.
   cp ../../locale/<language>.po ./wxstd.pot
   - or -
   cp ../../locale/wxstd.pot .

   # now edit the files and do translate strings (this isn't done by gettext)
   # you can use another editor if you wish :-) No need to edit wxstd.pot if you
   # already got a translated one.
   vi internat.po wxstd.pot

   # create the message catalog files
   msgfmt -o internat.mo internat.po
   msgfmt -o wxstd.mo wxstd.pot

   # run the sample to test it
   cd ..
   ./internat <language>

Q. How to do update the translation of 'internat' sample for a language?
A. First of all, you will need the GNU gettext tools (see the next question).
   After you've probably installed them, type the following (example is for Unix
   and you should do exactly the same under Windows).

   # enter the directory of an already-existing translations which needs to be updated
   cd <language>

   # the -j flag tells xgettext to merge and not simply overwrite the output file
   xgettext -j -C -n -k_ -kwxPLURAL:1,2 -kwxTRANSLATE -o internat.po ../internat.cpp

   # now edit the files and do translate the new strings (this isn't done by gettext)
   vi internat.po

   # update the message catalog:
   msgfmt -o internat.mo internat.po

Q. How to get the gettext tools?
A. For Unix, you should be able to get the source distribution of any GNU mirror
   (see www.gnu.org for a start). gettext() version 0.10 is buggy, try to get at
   least version strictly greater than 0.10. gettext RPMs can be downloaded from
   the standard locations for Linux. For Windows, you can get the precompiled
   binaries from wxWidgets web page.

Q. What's i18n?
A. Count the number of letters in the word "internationalization".

Q. Where to send comments,
                 additional translations,
                 flames,
                 money?
A. To Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>,
      wxWidgets list <wx-dev@lists.wxwidgets.org>,
      /dev/null (platform-dependent),
      wxWidgets dev team Swiss bank account.