Use detection of config keys and sender domain to determine whether to dkim-sign...
[citadel.git] / webcit / gettext.c
index 83b2df42917f7fb7a0e879aac79ff69fe8bbf066..8c749cb279df79a45b6968cb153d5c4c5d0e18ba 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "webcit.h"
-#include "webserver.h"
+
 #define SEARCH_LANG 20         /* how many langs should we parse? */
 
 #ifdef ENABLE_NLS
@@ -32,7 +32,9 @@ const char *AvailLang[] = {
        "fr_FR",
        "hu_HU",
        "it_IT",
+       "ko_KO",
        "nl_NL",
+       "pl_PL",
        "pt_BR",
        "ru_RU",
        "zh_CN",
@@ -262,7 +264,12 @@ void set_selected_language(const char *lang) {
 void go_selected_language(void) {
 #ifdef HAVE_USELOCALE
        wcsession *WCC = WC;
-       if (WCC->selected_language < 0) return;
+       if (WCC->selected_language < 0)
+       {
+               httplang_to_locale(WCC->Hdr->HR.browser_language, WCC);
+               if (WCC->selected_language < 0)
+                       return;
+       }
        uselocale(wc_locales[WCC->selected_language]);  /* switch locales */
        textdomain(textdomain(NULL));                   /* clear the cache */
 #else