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