From: Pander <pa...@us...> - 2005-02-15 21:07:14
|
Hi all, I would like to propose the following internationalisation (i18n) of podzilla. Here are following proposals, please shoot at them ;) 1) The integer value of variable lang should be stored in /etc/podzilla.conf. in ipod.h is already: #define LANGUAGE 30 It can be used with: ipod_get_setting(LANGUAGE)] 2) Language codes will have to be defined in ipod.h: static int ENGLISH = 0; static int FRENCH = 1; static int GERMAN = 2; static int DUTCH = 3; This might nog be needed but a clear order should be defined and extended as more languages get added. 3) In .h or better in the .c files the translation should be defined. Here are three simple examples: static char *lang_language[] = { "English", "Français", "Deutsch", "Nederlands" }; static char *lang_play[] = { "Play", "Jouez", "Abspielen", "Afspelen" }' static char *lang_month[][] = { { "Jan", "Feb", ..., "Dec" }, { "jan", "fev", ..., "dec" }, { "Jan", "Feb", ..., "Dec" }, { "jan", "feb", ..., "dec" }, } 4) Example usage would be like this printf(lang_play[ipod_get_setting(LANGUAGE)]); 5) System output as errors and warning should not be translated since that makes it easier to refer on the internet to certain issues. Greetz, Pander |