From 09778139156d73cd341bb3baf8a164f3a505d4cf Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Mon, 22 Sep 2003 19:34:48 +0000 Subject: [PATCH] Rewrite the i18n section. --- documentation/i18n.sgml | 232 ++++++++-------------------------------- 1 file changed, 43 insertions(+), 189 deletions(-) diff --git a/documentation/i18n.sgml b/documentation/i18n.sgml index 5381de8e8bf..b2498d3a1a3 100644 --- a/documentation/i18n.sgml +++ b/documentation/i18n.sgml @@ -4,203 +4,57 @@ Adding New Languages - - Written by &name-morten-welinder; &email-morten-welinder;, - January 1996. - - - - - - Thereafter revised February 1999 by Klaas van Gend - - - - - Revised again May 23, 1999, Klaas van Gend - - - - - Updated May 26, 2000, Zoran Dzelajlija - - - - - - (Extracted from wine/documentation/languages) - - This file documents the necessary procedure for adding a new language to the list of languages that Wine can display system - menus and forms in. Currently at least the following languages - are still missing: - - Bulgarian - Chinese - Greek - Icelandic - Japanese - Romanian - Croatian - Slovak - Turkish - Slovanian - + menus and forms in. Adding new translations is not hard as + it requires no programming knowledge or special skills. - - - I hope I got all the places where changes are - needed. If you see any place missing from the list, - submit a patch to this file please. Also note that - re-organization of the source code might change the list of - places. - - - - To add a new language you need to be able to translate the - relatively few texts, of course. You will need very little - knowledge of programming, so you have almost no excuses for - not adding your language, right? We should easily be able to - support 20 languages within a few months, get going! Apart - from re-compilation it'll take you about an hour or two. - - - To add a new language to the list of languages that Wine can - handle you must... + Language dependent resources reside in files + named somefile_Xx.rc or + Xx.rc, where Xx + is your language abbreviation (look for it in + include/winnls.h). These are included + in a master file named somefile.rc or + rsrc.rc, located in the same + directory as the language files. - - - - Find the language ID in - include/winnls.h. - - - - - Look in ole/ole2nls.c if your - language is already incorporated in the static - const struct NLS_langlocale. If not: find the - appropriate entries in - include/winnls.h and add them to the - list. - - - - - Edit the parameters defined in - ole/nls/*.nls to fit your local - habits and language. - - - - - Edit documentation/wine.man.in - (search for -language) to show the - new language abbreviation. - - - - - Edit misc/main.c variable - Languages to contain the new language - abbreviation and language ID. Also edit - struct option_table in - misc/options.c to show the new - abbreviation. - - - - - Edit include/options.h - enum WINE_LANGUAGE to have - a member called LANG_XX where - XX is the new abbreviation. - - - - - Create a new file - dlls/commdlg/cdlg_XX.rc (where - XX is your language abbreviation) - containing all menus. Your best bet is to copy - cdlg_En.rc and start translating. - There is no real need to know how the internal structure - of the file, as you only need to translate the text within - quotes. - - - In menus, the character "&" means that the next - character will be highlighted and that pressing that - letter will select the item. You should place these - "&" characters suitably for your language, not just - copy the positions from (say) English. In particular, - items within one menu should have different highlighted - letters. - - - - - Edit dlls/commdlg/rsrc.rc to contain - an #include statement for your - cdlg_XX.rc file. - - - - - Repeat steps 6 and 7 again for: - - - - dlls/shell32/shell32_XX.rc and - shres.rc - - - - - resources/sysres_XX.rc and - user32.rc - - - - - - - - Re-configure, re-make dependencies, and re-make Wine. - - - - - Check your new menus and forms; when they're not ok, go - back to 6) and adapt the sizes, etc. - - - - - Several of the winelib based programs in the subdirectory - programs also have internationalization support. See the - appropriate files there for reference. - - - - - Edit documentation/internationalization - to show the new status. - - - - - Submit patches for inclusion in the next Wine release, see - file ./ANNOUNCE for details about - where to submit. - - - + + To add a new language to one of these resources you + need to make a copy of the English resource (located + in the somefile_En.rc file) over to + your somefile_Xx.rc file, include this + file in the master somefile.rc file, + and edit the new file to translate the English text. + You may also need to rearrange some of the controls + to better fit the newly translated strings. Test your changes + to make sure they properly layout on the screen. + + + + In menus, the character "&" means that the next + character will be highlighted and that pressing that + letter will select the item. You should place these + "&" characters suitably for your language, not just + copy the positions from English. In particular, + items within one menu should have different highlighted + letters. + + + + To get a list of the files that need translating, + run the following command in the root of your Wine tree: + find -name "*En.rc". + + + + When adding a new language, also make sure the parameters + defined in ./dlls/kernel/nls/*.nls + fit your local habits and language. +