diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2007-08-12 12:18:23 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2007-08-12 12:18:23 +0200 |
commit | 4c28809e2d438f3907427dab9bf35c2d8ebb1662 (patch) | |
tree | 9057c7924a9694e4ca2c9574fd90e28c075aa7cc /i18n.c | |
parent | 365eda6cdd6b46f50aa98dff29b1d040867b8eec (diff) | |
download | vdr-4c28809e2d438f3907427dab9bf35c2d8ebb1662.tar.gz vdr-4c28809e2d438f3907427dab9bf35c2d8ebb1662.tar.bz2 |
No more default for OSDLanguage
Diffstat (limited to 'i18n.c')
-rw-r--r-- | i18n.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: i18n.c 1.307 2007/08/12 09:51:15 kls Exp $ + * $Id: i18n.c 1.308 2007/08/12 12:15:29 kls Exp $ * * */ @@ -149,13 +149,15 @@ void I18nRegister(const char *Plugin) void I18nSetLocale(const char *Locale) { - int i = LanguageLocales.Find(Locale); - if (i >= 0) { - CurrentLanguage = i; - setlocale(LC_MESSAGES, Locale); + if (Locale && *Locale) { + int i = LanguageLocales.Find(Locale); + if (i >= 0) { + CurrentLanguage = i; + setlocale(LC_MESSAGES, Locale); + } + else + dsyslog("unknown locale: '%s'", Locale); } - else - dsyslog("unknown locale: '%s'", Locale); } int I18nCurrentLanguage(void) |