blob: 5153b31de352109242ee667b9659a141f3b62207 [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
Klaas van Gend4a8639c1999-02-11 16:32:16 +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
23 appropriate entries in /include/winnls.h and add them to the list.
24
252. Edit the parameters defined in /ole/nls/*.nls to fit your local
26 habits and language.
27
283. Edit documentation/wine.man (search for -language) to show the new
29 language abbreviation.
30
314. Edit misc/main.c variable "Languages" to contain the new language
Alexandre Julliard8bbf8181996-09-13 16:50:47 +000032 abbreviation and language ID. Also edit macro "USAGE" to show the
33 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 Gend4a8639c1999-02-11 16:32:16 +0000386. Edit resources/sysres.c variable "SYSRES_Resources" to contain an
39 entry for your language.
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000040
Klaas van Gend4a8639c1999-02-11 16:32:16 +0000417. Create a new file, resources/sysres_XX.rc, where XX is the
42 abbreviation that you chose. Your best bet is to copy sysres_En.rc
43 and start translating. [Warning: the author of this file does not
44 know the details of the structure of these files.
45 There seems to be no need to, however.]
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000046
47 In menus, the character "&" means that the next character will
48 be highlighted and that pressing that letter will select the item.
49 You should place these "&"s suitably for your language, not just
50 copy the positions from (say) English. In particular, items within
51 one menu should have different highlighted letters.
52
Klaas van Gend4a8639c1999-02-11 16:32:16 +0000538. Edit resources/Makefile.in to add the name of the new file to the
Alexandre Julliard530ee841996-10-23 16:59:13 +000054 SYSRES_SRCS variable.
55
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000569. Re-configure, re-make dependencies, and re-make Wine.
57
Klaas van Gend4a8639c1999-02-11 16:32:16 +00005810. Check your new menus and forms; when they're not ok,
59 go back to 7) and adapt the sizes, etc.
60
6111. Edit /resources/TODO if necessary.
62
6312. Submit patches for inclusion in the next Wine release,
64 see file ./ANNOUNCE for details about where to submit.
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000065
66
67January 1996
68Morten Welinder
69
70[I hope I got all the places where changes are needed. If you see any
71place missing from the above list, submit a patch to this file please.
72Also note that re-organization of the source code might change the list
73of places.]
Klaas van Gend4a8639c1999-02-11 16:32:16 +000074
75Therefore revised Februari 1999 by Klaas van Gend