From: Art Cancro Date: Tue, 21 Feb 2012 23:44:40 +0000 (-0500) Subject: Simplified tmplput_offer_languages() behavior on non-locale systems X-Git-Tag: v8.11~183 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=58df800218902d07dcf3b81a28c31354fb1025d2 Simplified tmplput_offer_languages() behavior on non-locale systems --- diff --git a/webcit/gettext.c b/webcit/gettext.c index 25474e810..4df641a28 100644 --- a/webcit/gettext.c +++ b/webcit/gettext.c @@ -209,25 +209,12 @@ 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 } /*