summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-08-11 12:39:06 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-08-11 12:39:06 +0200
commit0f7a4af1683abfe892cb6d05536818a964d8cfe6 (patch)
tree13bb325aa8f5b390db1227c7875b0e406a43efec /config.c
parent5b8fe34a0e8398a901eebe42c9385622d9bd7a22 (diff)
downloadvdr-0f7a4af1683abfe892cb6d05536818a964d8cfe6.tar.gz
vdr-0f7a4af1683abfe892cb6d05536818a964d8cfe6.tar.bz2
Switched I18N to gettext
Diffstat (limited to 'config.c')
-rw-r--r--config.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/config.c b/config.c
index 05f7f1ff..9ef40450 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.154 2007/06/23 09:42:49 kls Exp $
+ * $Id: config.c 1.155 2007/08/10 12:58:08 kls Exp $
*/
#include "config.h"
@@ -214,7 +214,7 @@ cSetup Setup;
cSetup::cSetup(void)
{
- OSDLanguage = 0;
+ strcpy(OSDLanguage, I18N_DEFAULT_LOCALE);
strcpy(OSDSkin, "sttng");
strcpy(OSDTheme, "default");
PrimaryDVB = 1;
@@ -349,9 +349,9 @@ bool cSetup::Load(const char *FileName)
void cSetup::StoreLanguages(const char *Name, int *Values)
{
- char buffer[I18nNumLanguages * 4];
+ char buffer[I18nLanguages()->Size() * 4];
char *q = buffer;
- for (int i = 0; i < I18nNumLanguages; i++) {
+ for (int i = 0; i < I18nLanguages()->Size(); i++) {
if (Values[i] < 0)
break;
const char *s = I18nLanguageCode(Values[i]);
@@ -369,7 +369,7 @@ void cSetup::StoreLanguages(const char *Name, int *Values)
bool cSetup::ParseLanguages(const char *Value, int *Values)
{
int n = 0;
- while (Value && *Value && n < I18nNumLanguages) {
+ while (Value && *Value && n < I18nLanguages()->Size()) {
char buffer[4];
strn0cpy(buffer, Value, sizeof(buffer));
int i = I18nLanguageIndex(buffer);
@@ -384,7 +384,7 @@ bool cSetup::ParseLanguages(const char *Value, int *Values)
bool cSetup::Parse(const char *Name, const char *Value)
{
- if (!strcasecmp(Name, "OSDLanguage")) OSDLanguage = atoi(Value);
+ if (!strcasecmp(Name, "OSDLanguage")) { strn0cpy(OSDLanguage, Value, sizeof(OSDLanguage)); I18nSetLocale(OSDLanguage); }
else if (!strcasecmp(Name, "OSDSkin")) Utf8Strn0Cpy(OSDSkin, Value, MaxSkinName);
else if (!strcasecmp(Name, "OSDTheme")) Utf8Strn0Cpy(OSDTheme, Value, MaxThemeName);
else if (!strcasecmp(Name, "PrimaryDVB")) PrimaryDVB = atoi(Value);