2 <title>Internationalization
</title>
4 <sect1 id=
"adding-languages">
5 <title>Adding New Languages
</title>
8 Written by &name-morten-welinder;
<email>&email-morten-welinder;
</email>,
14 <para>Thereafter revised February
1999 by Klaas van Gend
</para>
17 <para>Revised again May
23,
1999, Klaas van Gend
</para>
20 <para>Updated May
26,
2000, Zoran Dzelajlija
</para>
25 (Extracted from
<filename>wine/documentation/languages
</filename>)
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
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>
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
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.
66 To add a new language to the list of languages that Wine can
72 <para>Find the language ID in
73 <filename>include/winnls.h
</filename>.
</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
87 Edit the parameters defined in
88 <filename>ole/nls/*.nls
</filename> to fit your local
94 Edit
<filename>documentation/wine.man.in
</filename>
95 (search for
<parameter>-language
</parameter>) to show the
96 new language abbreviation.
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
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.
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
129 In menus, the character
"&" means that the next
130 character will be highlighted and that pressing that
131 letter will select the item. You should place these
132 "&" 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
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.
147 Repeat steps
6 and
7 again for:
151 <filename>dlls/shell32/shell32_XX.rc
</filename> and
152 <filename>shres.rc
</filename>
157 <filename>resources/sysres_XX.rc
</filename> and
158 <filename>user32.rc
</filename>
166 Re-configure, re-make dependencies, and re-make Wine.
171 Check your new menus and forms; when they're not ok, go
172 back to
6) and adapt the sizes, etc.
177 Several of the winelib based programs in the subdirectory
178 programs also have internationalisation support. See the
179 appropriate files there for reference.
184 <filename>documentation/internationalisation
</filename> to
185 show the new status.
</para>
189 Submit patches for inclusion in the next Wine release, see
190 file
<filename>./ANNOUNCE
</filename> for details about
198 <!-- Keep this comment at the end of the file
201 sgml-parent-document:("wine-doc.sgml" "set" "book" "part" "chapter" "")