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>,
15 Thereafter revised February
1999 by Klaas van Gend
20 Revised again May
23,
1999, Klaas van Gend
25 Updated May
26,
2000, Zoran Dzelajlija
31 (Extracted from
<filename>wine/documentation/languages
</filename>)
35 This file documents the necessary procedure for adding a new
36 language to the list of languages that Wine can display system
37 menus and forms in. Currently at least the following languages
39 <simplelist columns=
"5" type=
"horiz">
40 <member>Bulgarian
</member>
41 <member>Chinese
</member>
42 <member>Greek
</member>
43 <member>Icelandic
</member>
44 <member>Japanese
</member>
45 <member>Romanian
</member>
46 <member>Croatian
</member>
47 <member>Slovak
</member>
48 <member>Turkish
</member>
49 <member>Slovanian
</member>
55 <emphasis>I hope I got all the places where changes are
56 needed. If you see any place missing from the list,
57 submit a patch to this file please. Also note that
58 re-organization of the source code might change the list of
64 To add a new language you need to be able to translate the
65 relatively few texts, of course. You will need very little
66 knowledge of programming, so you have almost no excuses for
67 not adding your language, right? We should easily be able to
68 support
20 languages within a few months, get going! Apart
69 from re-compilation it'll take you about an hour or two.
72 To add a new language to the list of languages that Wine can
79 Find the language ID in
80 <filename>include/winnls.h
</filename>.
85 Look in
<filename>ole/ole2nls.c
</filename> if your
86 language is already incorporated in the
<varname>static
87 const struct NLS_langlocale
</varname>. If not: find the
88 appropriate entries in
89 <filename>include/winnls.h
</filename> and add them to the
95 Edit the parameters defined in
96 <filename>ole/nls/*.nls
</filename> to fit your local
102 Edit
<filename>documentation/wine.man.in
</filename>
103 (search for
<parameter>-language
</parameter>) to show the
104 new language abbreviation.
109 Edit
<filename>misc/main.c
</filename> variable
110 <varname>Languages
</varname> to contain the new language
111 abbreviation and language ID. Also edit
112 <structname>struct option_table
</structname> in
113 <filename>misc/options.c
</filename> to show the new
119 Edit
<filename>include/options.h
</filename>
120 <type>enum
</type> <varname>WINE_LANGUAGE
</varname> to have
121 a member called
<literal>LANG_XX
</literal> where
122 <literal>XX
</literal> is the new abbreviation.
128 <filename>dlls/commdlg/cdlg_XX.rc
</filename> (where
129 <literal>XX
</literal> is your language abbreviation)
130 containing all menus. Your best bet is to copy
131 <filename>cdlg_En.rc
</filename> and start translating.
132 There is no real need to know how the internal structure
133 of the file, as you only need to translate the text within
137 In menus, the character
"&" means that the next
138 character will be highlighted and that pressing that
139 letter will select the item. You should place these
140 "&" characters suitably for your language, not just
141 copy the positions from (say) English. In particular,
142 items within one menu should have different highlighted
148 Edit
<filename>dlls/commdlg/rsrc.rc
</filename> to contain
149 an
<symbol>#include
</symbol> statement for your
150 <filename>cdlg_XX.rc
</filename> file.
155 Repeat steps
6 and
7 again for:
159 <filename>dlls/shell32/shell32_XX.rc
</filename> and
160 <filename>shres.rc
</filename>
165 <filename>resources/sysres_XX.rc
</filename> and
166 <filename>user32.rc
</filename>
174 Re-configure, re-make dependencies, and re-make Wine.
179 Check your new menus and forms; when they're not ok, go
180 back to
6) and adapt the sizes, etc.
185 Several of the winelib based programs in the subdirectory
186 programs also have internationalization support. See the
187 appropriate files there for reference.
192 Edit
<filename>documentation/internationalization
</filename>
193 to show the new status.
198 Submit patches for inclusion in the next Wine release, see
199 file
<filename>./ANNOUNCE
</filename> for details about
207 <!-- Keep this comment at the end of the file
210 sgml-parent-document:("wine-devel.sgml" "set" "book" "part" "chapter" "")