summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-08-12 12:18:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-08-12 12:18:23 +0200
commit4c28809e2d438f3907427dab9bf35c2d8ebb1662 (patch)
tree9057c7924a9694e4ca2c9574fd90e28c075aa7cc /i18n.c
parent365eda6cdd6b46f50aa98dff29b1d040867b8eec (diff)
downloadvdr-4c28809e2d438f3907427dab9bf35c2d8ebb1662.tar.gz
vdr-4c28809e2d438f3907427dab9bf35c2d8ebb1662.tar.bz2
No more default for OSDLanguage
Diffstat (limited to 'i18n.c')
-rw-r--r--i18n.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/i18n.c b/i18n.c
index 2d096048..1673e539 100644
--- a/i18n.c
+++ b/i18n.c
@@ -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)