/*
- * Copyright (c) 1996-2010 by the citadel.org team
+ * Copyright (c) 1996-2011 by the citadel.org team
*
* This program is open source software. You can redistribute it and/or
* modify it under the terms of the GNU General Public License as
"en_GB",
"es_ES",
"et_EE",
+ "fi_FI",
"fr_FR",
"hu_HU",
"it_IT",
"nl_NL",
"pt_BR",
"ru_RU",
+ "zh_CN",
""
};
return;
}
- wc_printf("<select name=\"language\" id=\"lname\" size=\"1\" onChange=\"window.location.reload();\">\n");
+ wc_printf("<select name=\"language\" id=\"lname\" size=\"1\" onChange=\"switch_to_lang($('lname').value);\">\n");
for (i=0; i < nLocalesLoaded; ++i) {
#ifndef HAVE_USELOCALE
int i;
char buf[32];
char *language = NULL;
- char *locale;
-
nLocales = 0;
while (!IsEmptyStr(AvailLang[nLocales]))
}
#ifdef ENABLE_NLS
- locale = setlocale(LC_ALL, "");
+ /*locale = */setlocale(LC_ALL, "");
syslog(9, "Message catalog directory: %s\n", bindtextdomain("webcit", LOCALEDIR"/locale"));
syslog(9, "Text domain: %s\n", textdomain("webcit"));
hdr->HR.browser_language = Line;
}
+
void
InitModule_GETTEXT
(void)
(wcsession *sess)
{
#ifdef ENABLE_NLS
- if (!sess->Hdr->HR.Static &&
- (sess->Hdr->HR.browser_language != NULL)) {
+ if ( (sess != NULL)
+ && (!sess->Hdr->HR.Static)
+ && (sess->Hdr->HR.browser_language != NULL)
+ ) {
httplang_to_locale(sess->Hdr->HR.browser_language, sess);
}
#endif