Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 1 | ADDING LANGUAGES TO WINE |
| 2 | |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 3 | This file documents the necessary procedure for adding a new language |
| 4 | to the list of languages that Wine can display system menus and forms |
Jukka-Pekka Iivonen | c38189d | 1999-01-30 12:37:27 +0000 | [diff] [blame] | 5 | in. Currently at least the following languages are still missing: |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 6 | Bulgarian, Chinese, Greek, Icelandic, Japanese, Romanian, |
Alexander Kanavin | 91d72b9 | 1999-03-10 18:01:35 +0000 | [diff] [blame^] | 7 | Croatian, Slovak, Turkish, and Slovanian. |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 8 | |
| 9 | To add a new language you need to be able to translate the relatively |
| 10 | few texts, of course. You will need very little knowledge of |
| 11 | programming, so you have almost no excuses for not adding your language, |
| 12 | right? We should easily be able to support 20 languages within a few |
| 13 | months, get going! Apart from re-compilation it'll take you about an |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 14 | hour or two. |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 15 | |
| 16 | To add a new language to the list of languages that Wine can handle |
| 17 | you must... |
| 18 | |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 19 | 0. Find the language ID in /include/winnls.h . |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 20 | |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 21 | 1. 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 | |
| 25 | 2. Edit the parameters defined in /ole/nls/*.nls to fit your local |
| 26 | habits and language. |
| 27 | |
| 28 | 3. Edit documentation/wine.man (search for -language) to show the new |
| 29 | language abbreviation. |
| 30 | |
| 31 | 4. Edit misc/main.c variable "Languages" to contain the new language |
Alexandre Julliard | 8bbf818 | 1996-09-13 16:50:47 +0000 | [diff] [blame] | 32 | abbreviation and language ID. Also edit macro "USAGE" to show the |
| 33 | new abbreviation. |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 34 | |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 35 | 5. Edit include/options.h enum "WINE_LANGUAGE" to have a member called |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 36 | LANG_XX where XX is the new abbreviation. |
| 37 | |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 38 | 6. Edit resources/sysres.c variable "SYSRES_Resources" to contain an |
| 39 | entry for your language. |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 40 | |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 41 | 7. 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 Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 46 | |
| 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 Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 53 | 8. Edit resources/Makefile.in to add the name of the new file to the |
Alexandre Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 54 | SYSRES_SRCS variable. |
| 55 | |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 56 | 9. Re-configure, re-make dependencies, and re-make Wine. |
| 57 | |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 58 | 10. Check your new menus and forms; when they're not ok, |
| 59 | go back to 7) and adapt the sizes, etc. |
| 60 | |
| 61 | 11. Edit /resources/TODO if necessary. |
| 62 | |
| 63 | 12. Submit patches for inclusion in the next Wine release, |
| 64 | see file ./ANNOUNCE for details about where to submit. |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 65 | |
| 66 | |
| 67 | January 1996 |
| 68 | Morten Welinder |
| 69 | |
| 70 | [I hope I got all the places where changes are needed. If you see any |
| 71 | place missing from the above list, submit a patch to this file please. |
| 72 | Also note that re-organization of the source code might change the list |
| 73 | of places.] |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 74 | |
| 75 | Therefore revised Februari 1999 by Klaas van Gend |