Added an explanation for the directory symlink stuff.
[wine/testsucceed.git] / documentation / i18n.sgml
blob21e58e3f34315b207d1b1fb0ac0aa08e67c7a66b
1 <chapter id="i18n">
2 <title>Internationalization</title>
4 <sect1 id="adding-languages">
5 <title>Adding New Languages</title>
7 <para>
8 written by Morten Welinder, January 1996.
9 </para>
11 <itemizedlist>
12 <listitem>
13 <para>Thereafter revised Februari 1999 by Klaas van Gend</para>
14 </listitem>
15 <listitem>
16 <para>Revised again May 23, 1999, Klaas van Gend</para>
17 </listitem>
18 <listitem>
19 <para>Updated May 26, 2000, Zoran Dzelajlija</para>
20 </listitem>
21 </itemizedlist>
23 <para>
24 (Extracted from <filename>wine/documentation/languages</filename>)
25 </para>
27 <para>
28 This file documents the necessary procedure for adding a new
29 language to the list of languages that Wine can display system
30 menus and forms in. Currently at least the following languages
31 are still missing:
32 <simplelist columns="5" type="horiz">
33 <member>Bulgarian</member>
34 <member>Chinese</member>
35 <member>Greek</member>
36 <member>Icelandic</member>
37 <member>Japanese</member>
38 <member>Romanian</member>
39 <member>Croatian</member>
40 <member>Turkish</member>
41 <member>Slovanian</member>
42 </simplelist>
43 </para>
45 <note>
46 <para>
47 <emphasis>I hope I got all the places where changes are
48 needed. If you see any place missing from the list,
49 submit a patch to this file please. Also note that
50 re-organization of the source code might change the list of
51 places.</emphasis>
52 </para>
53 </note>
55 <para>
56 To add a new language you need to be able to translate the
57 relatively few texts, of course. You will need very little
58 knowledge of programming, so you have almost no excuses for
59 not adding your language, right? We should easily be able to
60 support 20 languages within a few months, get going! Apart
61 from re-compilation it'll take you about an hour or two.
62 </para>
63 <para>
64 To add a new language to the list of languages that Wine can
65 handle you must...
66 </para>
68 <orderedlist>
69 <listitem>
70 <para>Find the language ID in
71 <filename>include/winnls.h</filename>.</para>
72 </listitem>
73 <listitem>
74 <para>
75 Look in <filename>ole/ole2nls.c</filename> if your
76 language is already incorporated in the <varname>static
77 const struct NLS_langlocale</varname>. If not: find the
78 appropriate entries in
79 <filename>include/winnls.h</filename> and add them to the
80 list.
81 </para>
82 </listitem>
83 <listitem>
84 <para>
85 Edit the parameters defined in
86 <filename>ole/nls/*.nls</filename> to fit your local
87 habits and language.
88 </para>
89 </listitem>
90 <listitem>
91 <para>
92 Edit <filename>documentation/wine.man.in</filename>
93 (search for <parameter>-language</parameter>) to show the
94 new language abbreviation.
95 </para>
96 </listitem>
97 <listitem>
98 <para>
99 Edit <filename>misc/main.c</filename> variable
100 <varname>Languages</varname> to contain the new language
101 abbreviation and language ID. Also edit
102 <structname>struct option_table</structname> in
103 <filename>misc/options.c</filename> to show the new
104 abbreviation.
105 </para>
106 </listitem>
107 <listitem>
108 <para>
109 Edit <filename>include/options.h</filename>
110 <type>enum</type> <varname>WINE_LANGUAGE</varname> to have
111 a member called <literal>LANG_XX</literal> where
112 <literal>XX</literal> is the new abbreviation.
113 </para>
114 </listitem>
115 <listitem>
116 <para>
117 Create a new file
118 <filename>dlls/commdlg/cdlg_XX.rc</filename> (where
119 <literal>XX</literal> is your language abbreviation)
120 containing all menus. Your best bet is to copy
121 <filename>cdlg_En.rc</filename> and start translating.
122 There is no real need to know how the internal structure
123 of the file, as you only need to translate the text within
124 quotes.
125 </para>
126 <para>
127 In menus, the character "&amp;" means that the next
128 character will be highlighted and that pressing that
129 letter will select the item. You should place these
130 "&amp;" characters suitably for your language, not just
131 copy the positions from (say) English. In particular,
132 items within one menu should have different highlighted
133 letters.
134 </para>
135 </listitem>
136 <listitem>
137 <para>
138 Edit <filename>dlls/commdlg/rsrc.rc</filename> to contain
139 an <symbol>#include</symbol> statement for your
140 <filename>cdlg_XX.rc</filename> file.
141 </para>
142 </listitem>
143 <listitem>
144 <para>
145 Repeat steps 6 and 7 again for:
146 <itemizedlist>
147 <listitem>
148 <para>
149 <filename>dlls/shell32/shell32_XX.rc</filename> and
150 <filename>shres.rc</filename>
151 </para>
152 </listitem>
153 <listitem>
154 <para>
155 <filename>resources/sysres_XX.rc</filename> and
156 <filename>user32.rc</filename>
157 </para>
158 </listitem>
159 </itemizedlist>
160 </para>
161 </listitem>
162 <listitem>
163 <para>
164 Re-configure, re-make dependencies, and re-make Wine.
165 </para>
166 </listitem>
167 <listitem>
168 <para>
169 Check your new menus and forms; when they're not ok, go
170 back to 6) and adapt the sizes, etc.
171 </para>
172 </listitem>
173 <listitem>
174 <para>
175 Several of the winelib based programs in the subdirectory
176 programs also have internationalisation support. See the
177 appropriate files there for reference.
178 </para>
179 </listitem>
180 <listitem>
181 <para>Edit
182 <filename>documentation/internationalisation</filename> to
183 show the new status.</para>
184 </listitem>
185 <listitem>
186 <para>
187 Submit patches for inclusion in the next Wine release, see
188 file <filename>./ANNOUNCE</filename> for details about
189 where to submit.
190 </para>
191 </listitem>
192 </orderedlist>
193 </sect1>
194 </chapter>
196 <!-- Keep this comment at the end of the file
197 Local variables:
198 mode: sgml
199 sgml-parent-document:("wine-doc.sgml" "book" "part" "chapter" "")
200 End: