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 | |
Zoran Dzelajlija | 846880b | 2000-05-30 20:50:45 +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 |
Zoran Dzelajlija | 846880b | 2000-05-30 20:50:45 +0000 | [diff] [blame] | 23 | appropriate entries in include/winnls.h and add them to the list. |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 24 | |
Zoran Dzelajlija | 846880b | 2000-05-30 20:50:45 +0000 | [diff] [blame] | 25 | 2. Edit the parameters defined in ole/nls/*.nls to fit your local |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 26 | habits and language. |
| 27 | |
Zoran Dzelajlija | 846880b | 2000-05-30 20:50:45 +0000 | [diff] [blame] | 28 | 3. Edit documentation/wine.man.in (search for -language) to show the new |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 29 | language abbreviation. |
| 30 | |
| 31 | 4. Edit misc/main.c variable "Languages" to contain the new language |
Zoran Dzelajlija | 846880b | 2000-05-30 20:50:45 +0000 | [diff] [blame] | 32 | abbreviation and language ID. Also edit struct "option_table" in |
| 33 | misc/options.c to show the 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 | 76355f4 | 1999-05-29 10:50:39 +0000 | [diff] [blame] | 38 | 6. 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 Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 43 | |
| 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 Gend | 76355f4 | 1999-05-29 10:50:39 +0000 | [diff] [blame] | 50 | 7. Edit dlls/commdlg/rsrc.rc to contain an include statement for your |
| 51 | cdlg_XX.rc file. |
| 52 | |
| 53 | 8. 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 Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 56 | |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 57 | 9. Re-configure, re-make dependencies, and re-make Wine. |
| 58 | |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 59 | 10. Check your new menus and forms; when they're not ok, |
Klaas van Gend | 76355f4 | 1999-05-29 10:50:39 +0000 | [diff] [blame] | 60 | go back to 6) and adapt the sizes, etc. |
| 61 | |
| 62 | 11. 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 Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 65 | |
Klaas van Gend | 76355f4 | 1999-05-29 10:50:39 +0000 | [diff] [blame] | 66 | 12. Edit /documentation/internationalisation to show the new status. |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 67 | |
Klaas van Gend | 76355f4 | 1999-05-29 10:50:39 +0000 | [diff] [blame] | 68 | 13. Submit patches for inclusion in the next Wine release, |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 69 | see file ./ANNOUNCE for details about where to submit. |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 70 | |
| 71 | |
| 72 | January 1996 |
| 73 | Morten Welinder |
| 74 | |
| 75 | [I hope I got all the places where changes are needed. If you see any |
| 76 | place missing from the above list, submit a patch to this file please. |
| 77 | Also note that re-organization of the source code might change the list |
| 78 | of places.] |
Klaas van Gend | 4a8639c | 1999-02-11 16:32:16 +0000 | [diff] [blame] | 79 | |
| 80 | Therefore revised Februari 1999 by Klaas van Gend |
Klaas van Gend | 76355f4 | 1999-05-29 10:50:39 +0000 | [diff] [blame] | 81 | Revised again May 23, 1999, Klaas van Gend |
Zoran Dzelajlija | 846880b | 2000-05-30 20:50:45 +0000 | [diff] [blame] | 82 | Updated May 26, 2000, Zoran Dzelajlija |