blob: 4d1eec24024d9ee9015e859e7e2ab1983c01a263 [file] [log] [blame]
Klaas van Gend4a8639c1999-02-11 16:32:16 +00001ADDING LANGUAGES TO WINE
2
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00003This file documents the necessary procedure for adding a new language
4to the list of languages that Wine can display system menus and forms
Jukka-Pekka Iivonenc38189d1999-01-30 12:37:27 +00005in. Currently at least the following languages are still missing:
Klaas van Gend4a8639c1999-02-11 16:32:16 +00006Bulgarian, Chinese, Greek, Icelandic, Japanese, Romanian,
Alexander Kanavin91d72b91999-03-10 18:01:35 +00007Croatian, Slovak, Turkish, and Slovanian.
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00008
9To add a new language you need to be able to translate the relatively
10few texts, of course. You will need very little knowledge of
11programming, so you have almost no excuses for not adding your language,
12right? We should easily be able to support 20 languages within a few
13months, get going! Apart from re-compilation it'll take you about an
Klaas van Gend4a8639c1999-02-11 16:32:16 +000014hour or two.
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000015
16To add a new language to the list of languages that Wine can handle
17you must...
18
Zoran Dzelajlija846880b2000-05-30 20:50:45 +0000190. Find the language ID in include/winnls.h .
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000020
Klaas van Gend4a8639c1999-02-11 16:32:16 +0000211. Look in ole/ole2nls.c if your language is already incorporated in
22 the "static const struct NLS_langlocale". If not: find the
Zoran Dzelajlija846880b2000-05-30 20:50:45 +000023 appropriate entries in include/winnls.h and add them to the list.
Klaas van Gend4a8639c1999-02-11 16:32:16 +000024
Zoran Dzelajlija846880b2000-05-30 20:50:45 +0000252. Edit the parameters defined in ole/nls/*.nls to fit your local
Klaas van Gend4a8639c1999-02-11 16:32:16 +000026 habits and language.
27
Zoran Dzelajlija846880b2000-05-30 20:50:45 +0000283. Edit documentation/wine.man.in (search for -language) to show the new
Klaas van Gend4a8639c1999-02-11 16:32:16 +000029 language abbreviation.
30
314. Edit misc/main.c variable "Languages" to contain the new language
Zoran Dzelajlija846880b2000-05-30 20:50:45 +000032 abbreviation and language ID. Also edit struct "option_table" in
33 misc/options.c to show the new abbreviation.
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000034
Klaas van Gend4a8639c1999-02-11 16:32:16 +0000355. Edit include/options.h enum "WINE_LANGUAGE" to have a member called
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000036 LANG_XX where XX is the new abbreviation.
37
Klaas van Gend76355f41999-05-29 10:50:39 +0000386. Create a new file dlls/commdlg/cdlg_XX.rc (where XX is your language
39 abbreviation) containing all menus.
40 Your best bet is to copy cdlg_En.rc and start translating.
41 There is no real need to know how the internal structure of the file,
42 as you only need to translate the text within quotes.
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000043
44 In menus, the character "&" means that the next character will
45 be highlighted and that pressing that letter will select the item.
46 You should place these "&"s suitably for your language, not just
47 copy the positions from (say) English. In particular, items within
48 one menu should have different highlighted letters.
49
Klaas van Gend76355f41999-05-29 10:50:39 +0000507. Edit dlls/commdlg/rsrc.rc to contain an include statement for your
51 cdlg_XX.rc file.
52
538. Repeat steps 6 and 7 again for:
54 - dlls/shell32/shell32_XX.rc and shres.rc
55 - resources/sysres_XX.rc and user32.rc
Alexandre Julliard530ee841996-10-23 16:59:13 +000056
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000579. Re-configure, re-make dependencies, and re-make Wine.
58
Klaas van Gend4a8639c1999-02-11 16:32:16 +00005910. Check your new menus and forms; when they're not ok,
Klaas van Gend76355f41999-05-29 10:50:39 +000060 go back to 6) and adapt the sizes, etc.
61
6211. Several of the winelib based programs in the subdirectory programs
63 also have internationalisation support. See the appropriate files
64 there for reference.
Klaas van Gend4a8639c1999-02-11 16:32:16 +000065
Klaas van Gend76355f41999-05-29 10:50:39 +00006612. Edit /documentation/internationalisation to show the new status.
Klaas van Gend4a8639c1999-02-11 16:32:16 +000067
Klaas van Gend76355f41999-05-29 10:50:39 +00006813. Submit patches for inclusion in the next Wine release,
Klaas van Gend4a8639c1999-02-11 16:32:16 +000069 see file ./ANNOUNCE for details about where to submit.
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000070
71
72January 1996
73Morten Welinder
74
75[I hope I got all the places where changes are needed. If you see any
76place missing from the above list, submit a patch to this file please.
77Also note that re-organization of the source code might change the list
78of places.]
Klaas van Gend4a8639c1999-02-11 16:32:16 +000079
80Therefore revised Februari 1999 by Klaas van Gend
Klaas van Gend76355f41999-05-29 10:50:39 +000081Revised again May 23, 1999, Klaas van Gend
Zoran Dzelajlija846880b2000-05-30 20:50:45 +000082Updated May 26, 2000, Zoran Dzelajlija