Hi! Very nice to see gettext() working, for a while I thought it was going to be a complete mess :)
IMHO, two simple things could still be done: Attached is a simple patch that allows using VDR with large localedir that contains more locales than I18N_MAX_LANGUAGES. AFAICS there is no reason to stop searching unless I18N_MAX_LANGUAGES vdr locales were actually found. Also, it is a convention (all programs in my system follow it) that .po files (and thus the locale directory name) be without the territory name, i.e. fi instead of fi_FI. If there would be any additional translations for some language, they would be named like fi_DE. -- Anssi Hannula
Index: vdr-1.5.8/i18n.c =================================================================== --- vdr-1.5.8/i18n.c +++ vdr-1.5.8/i18n.c 2007-08-19 18:38:54.000000000 +0300 @@ -112,7 +112,7 @@ for (int i = 0; i < Locales.Size(); i++) { cString FileName = cString::sprintf("%s/%s/LC_MESSAGES/vdr.mo", I18nLocaleDir, Locales[i]); if (access(FileName, F_OK) == 0) { // found a locale with VDR texts - if (i < I18N_MAX_LANGUAGES - 1) { + if (NumLocales < I18N_MAX_LANGUAGES) { SetEnvLanguage(Locales[i]); NumLocales++; if (strstr(OldLocale, Locales[i]) == OldLocale)
_______________________________________________ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr