wxWidgets/samples/internat
Mattia Barbon aec18ff785 Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth
Addresses:
  printf-format warinigs
  indentation/style
  unused variable warnings
  used wxID_ABOUT for about menu entry
  removed references to "minimal sample" in other samples
  some other misc warinigs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-01 19:12:24 +00:00
..
de my previous commit corrupted the catalogs, reverted 2002-03-17 00:51:05 +00:00
fr my previous commit corrupted the catalogs, reverted 2002-03-17 00:51:05 +00:00
ru my previous commit corrupted the catalogs, reverted 2002-03-17 00:51:05 +00:00
.cvsignore store CodeWarrior 5.3 projects as xml instead of binary projects 2001-12-02 18:11:49 +00:00
internat.cpp Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
internat.def Initial revision 1998-05-20 14:01:55 +00:00
internat.dsp Updated VC++ files 2002-01-18 14:33:01 +00:00
internat.pro added new project files for all samples and demos; removed the old ones 2001-10-09 22:30:29 +00:00
internat.rc Initial revision 1998-05-20 14:01:55 +00:00
internatM5.xml updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
makefile.b32 Simplified BC++ makefiles; C++Builder 1.0 compilation seems to work; 1999-01-04 21:51:15 +00:00
makefile.bcc Changes for 16-bit BC++ (not there yet), GnuWin32; typetest sample 1998-12-28 12:35:49 +00:00
makefile.dos wxPaintDC -> wxDC in wxListCtrl; fixed compile problems in wxTreeCtrl (return 1998-12-20 23:49:21 +00:00
makefile.g95 Rationalised Cygwin sample makefiles 1999-02-09 15:37:52 +00:00
Makefile.in inserted @IF_GNU_MAKE@ to allow building with other make versions 2002-01-25 11:31:21 +00:00
makefile.sc Initial revision 1998-05-20 14:01:55 +00:00
makefile.unx replaced "CC = gcc" and even stranger "CPP = gcc -g" (huh?) with 2001-11-28 18:10:15 +00:00
makefile.vc Renamed .nt makefiles to .vc and factored them out; made DND sample compile 1999-01-24 19:13:55 +00:00
makefile.vms Initial revision 1998-05-20 14:01:55 +00:00
makefile.wat Watcom C++ mods 1999-01-07 15:22:05 +00:00
makemac6.mcp added carbonaccessors.o 2001-08-19 17:18:03 +00:00
mondrian.ico Initial revision 1998-05-20 14:01:55 +00:00
mondrian.xpm Added bitmaps and icons to samples 1998-07-31 20:04:04 +00:00
readme.txt Added German translation to internat sample. 1999-08-28 16:50:39 +00:00
wxstd.po updated i18n sample, french translations are now in the "fr" subdirectory. 1999-01-13 19:01:43 +00:00

This is the README file for the internationalization sample for wxWindows 2.0.

Q. What does this stupid program do?
A. It demonstrates how to translate all program messages to a foreign language.
   In any program using wxWindows there is going to be 3 kinds of messages: the
   messages from the program itself, the messages from the wxWindows 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 question).
   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_ -o internat.po ../internat.cpp
   
   # .po file for wxWindows might be generated in the same way, but for now just
   # take this one...
   cp ../wxstd.po .

   # now edit the files and do translate strings (this isn't done by gettext)
   # you can use another editor if you wish :-)
   vi internat.po wxstd.po

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

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

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 wxWindows 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>,
      wxWindows list <wxwin-developers@wx.dent.med.uni-muenchen.de>,
      /dev/null (platform-dependent),
      wxWindows dev team Swiss bank account.