X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd323a5e230f2b08227b307ff900698fb85d5519..31848e7da515216ac5bda1cf85250bc3f7d77781:/samples/internat/readme.txt diff --git a/samples/internat/readme.txt b/samples/internat/readme.txt index 11eb77f465..526cc55ea5 100644 --- a/samples/internat/readme.txt +++ b/samples/internat/readme.txt @@ -1,9 +1,9 @@ -This is the README file for the internationalization sample for wxWindows 2.0. +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 wxWindows there is going to be 3 kinds of messages: the - messages from the program itself, the messages from the wxWindows library and + 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. @@ -19,7 +19,7 @@ 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. @@ -36,7 +36,7 @@ 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 @@ -44,30 +44,34 @@ A. First of all, you will need the GNU gettext tools (see the next question). # generate the .po file for the program itself # see `xgettext --help' for options, "-C" is important! - xgettext -C -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 . + 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/.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 :-) - vi internat.po wxstd.po + # 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.po + msgfmt -o wxstd.mo wxstd.pot # run the sample to test it cd .. - ./$OSTYPE/internat + ./internat 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. + binaries from wxWidgets web page. Q. What's i18n? A. Count the number of letters in the word "internationalization". @@ -77,6 +81,6 @@ Q. Where to send comments, flames, money? A. To Vadim Zeitlin , - wxWindows list , + wxWidgets list , /dev/null (platform-dependent), - wxWindows dev team Suiss banc account. + wxWidgets dev team Swiss bank account.