2 <title>Internationalization
</title>
4 <sect1 id=
"adding-languages">
5 <title>Adding New Languages
</title>
8 written by Morten Welinder, January
1996.
13 <para>Thereafter revised Februari
1999 by Klaas van Gend
</para>
16 <para>Revised again May
23,
1999, Klaas van Gend
</para>
19 <para>Updated May
26,
2000, Zoran Dzelajlija
</para>
24 (Extracted from
<filename>wine/documentation/languages
</filename>)
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
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>
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
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.
64 To add a new language to the list of languages that Wine can
70 <para>Find the language ID in
71 <filename>include/winnls.h
</filename>.
</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
85 Edit the parameters defined in
86 <filename>ole/nls/*.nls
</filename> to fit your local
92 Edit
<filename>documentation/wine.man.in
</filename>
93 (search for
<parameter>-language
</parameter>) to show the
94 new language abbreviation.
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
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.
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
127 In menus, the character
"&" means that the next
128 character will be highlighted and that pressing that
129 letter will select the item. You should place these
130 "&" 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
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.
145 Repeat steps
6 and
7 again for:
149 <filename>dlls/shell32/shell32_XX.rc
</filename> and
150 <filename>shres.rc
</filename>
155 <filename>resources/sysres_XX.rc
</filename> and
156 <filename>user32.rc
</filename>
164 Re-configure, re-make dependencies, and re-make Wine.
169 Check your new menus and forms; when they're not ok, go
170 back to
6) and adapt the sizes, etc.
175 Several of the winelib based programs in the subdirectory
176 programs also have internationalisation support. See the
177 appropriate files there for reference.
182 <filename>documentation/internationalisation
</filename> to
183 show the new status.
</para>
187 Submit patches for inclusion in the next Wine release, see
188 file
<filename>./ANNOUNCE
</filename> for details about
196 <!-- Keep this comment at the end of the file
199 sgml-parent-document:("wine-doc.sgml" "book" "part" "chapter" "")