Switching languages now works again
[citadel.git] / webcit / gettext.c
index 432e0ff7428938fa9b74c16cec39206d516c1f33..a4dbd3bbef65ef26cef7d710ddf50dbb2d0a5b30 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -217,7 +217,7 @@ void tmplput_offer_languages(StrBuf *Target, WCTemplputParams *TP)
                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
@@ -448,6 +448,7 @@ void Header_HandleAcceptLanguage(StrBuf *Line, ParsedHttpHdrs *hdr)
        hdr->HR.browser_language = Line;
 }
 
+
 void 
 InitModule_GETTEXT
 (void)