From: Art Cancro Date: Sun, 26 Feb 2012 20:15:44 +0000 (-0500) Subject: Revert "Simplified tmplput_offer_languages() behavior on non-locale systems" X-Git-Tag: v8.11~160^2~7 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=4582e28cd2a42b4f106414ed565fb2564d4adad6 Revert "Simplified tmplput_offer_languages() behavior on non-locale systems" This reverts commit 58df800218902d07dcf3b81a28c31354fb1025d2. --- diff --git a/webcit/gettext.c b/webcit/gettext.c index 4df641a28..25474e810 100644 --- a/webcit/gettext.c +++ b/webcit/gettext.c @@ -209,12 +209,25 @@ void httplang_to_locale(StrBuf *LocaleString, wcsession *sess) */ void tmplput_offer_languages(StrBuf *Target, WCTemplputParams *TP) { -#ifdef HAVE_USELOCALE int i; +#ifndef HAVE_USELOCALE + char *Lang = getenv("LANG"); + + if (Lang == NULL) + Lang = "C"; +#endif + + if (nLocalesLoaded == 1) { + wc_printf("

%s

", AvailLangLoaded[0]); + return; + } wc_printf("\n"); -#else - wc_printf("%s", (getenv("LANG") ? getenv("LANG") : "C")); -#endif } /*