]> git.saurik.com Git - wxWidgets.git/blame - samples/internat/readme.txt
Added wxStringBufferLength: works like wxStringBuffer, except
[wxWidgets.git] / samples / internat / readme.txt
CommitLineData
fd323a5e
VZ
1This is the README file for the internationalization sample for wxWindows 2.0.
2
3Q. What does this stupid program do?
4A. It demonstrates how to translate all program messages to a foreign language.
5 In any program using wxWindows there is going to be 3 kinds of messages: the
6 messages from the program itself, the messages from the wxWindows library and
7 the messages from the system (e.g. system error messages). This program
8 translates the first 2 kinds of messages but the system messages will be only
9 translated if your system supports it.
10
11 Brief usage summary: "Test|File" tries to open a non existing file (provoking
12 system error message), "Test|Play" shows a message box asking for a number.
13 Hint: try some special values like 9 and 17.
14
15Q. Why the error message when I try to open a non existing file is only partly
16 translated?
17A. Your system doesn't have the translation in the language you use, sorry.
18
19Q. Why the message when I enter '9' is not translated?
20A. This is on purpose: the corresponding string wasn't enclosed in _() macro and
21 so didn't get into the message catalog when it was created using xgettext.
22
23Q. Why the message when I enter '17' is only partly translated?
24A. This will only work under some versions of Linux, don't worry if the second
25 half of the sentence is not translated.
26
27Q. I don't speak french, what about translations to <language>?
28A. Please write them - see the next question. French is chosen by default
29 because it's the only translation which is currently available. To test
30 translations to the other languages please run the sample with 2 command line
31 arguments: the full language name and the name of the directory where the
32 message catalogs for this language are (will be taken as 2 first letters of
33 the language name if only 1 argument is given).
34
35Q. How to do translations to other language?
36A. First of all, you will need the GNU gettext tools (see the next question).
37 After you've probably installed them, type the following (example is for Unix
38 and you should do exactly the same under Windows).
39
40 # all translations forgiven language should be in a separate directory.
41 # Please use the standard abbreviation for the language names!
42 mkdir <language>
43 cd <language>
44
45 # generate the .po file for the program itself
46 # see `xgettext --help' for options, "-C" is important!
6a2a235b 47 xgettext -C -n -k_ -o internat.po ../internat.cpp
fd323a5e
VZ
48
49 # .po file for wxWindows might be generated in the same way, but for now just
50 # take this one...
51 cp ../wxstd.po .
52
53 # now edit the files and do translate strings (this isn't done by gettext)
54 # you can use another editor if you wish :-)
55 vi internat.po wxstd.po
56
57 # create the message catalog files
58 msgfmt -o internat.mo internat.po
59 msgfmt -o wxstd.mo wxstd.po
60
61 # run the sample to test it
62 cd ..
6a2a235b 63 ./internat <language> <langid>
fd323a5e
VZ
64
65Q. How to get the gettext tools?
66A. For Unix, you should be able to get the source distribution of any GNU mirror
67 (see www.gnu.org for a start). gettext() version 0.10 is buggy, try to get at
68 least version strictly greater than 0.10. gettext RPMs can be downloaded from
69 the standard locations for Linux. For Windows, you can get the precompiled
70 binaries from wxWindows web page.
71
72Q. What's i18n?
73A. Count the number of letters in the word "internationalization".
74
75Q. Where to send comments,
76 additional translations,
77 flames,
78 money?
79A. To Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>,
80 wxWindows list <wxwin-developers@wx.dent.med.uni-muenchen.de>,
81 /dev/null (platform-dependent),
59e9bd3e 82 wxWindows dev team Swiss bank account.