]> code.citadel.org Git - citadel.git/blobdiff - webcit/fmt_date.c
Localization hacks.
[citadel.git] / webcit / fmt_date.c
index a8c16b12a5136dcd64ca8f32433730b7e1cb6b17..2c7c9f6fd237b82981375bf8b9d8a50d7dc235d0 100644 (file)
@@ -26,7 +26,12 @@ typedef unsigned char byte; /**< a byte. */
 size_t wc_strftime(char *s, size_t max, const char *format, const struct tm *tm)
 {
 #ifdef ENABLE_NLS
-       return strftime_l(s, max, format, tm, wc_locales[WC->selected_language]);
+       if (wc_locales[WC->selected_language] == NULL) {
+               return strftime(s, max, format, tm);
+       }
+       else {
+               return strftime_l(s, max, format, tm, wc_locales[WC->selected_language]);
+       }
 #else
        return strftime(s, max, format, tm);
 #endif