+2004-03-24 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * filetools.C (i18nLibFileSearch): simplify the logic a bit
+
2004-03-23 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* filetools.C (i18nLibFileSearch): fix the logic to match closely
variable. But we don't use the value if the currently
selected locale is the C locale. This is a GNU extension. */
/* [Otherwise] We have to proceed with the POSIX methods of
- looking to `LC_ALL', `LC_xxx', and `LANG'. On some systems
- this can be done by the `setlocale' function itself. */
+ looking to `LC_ALL', `LC_xxx', and `LANG'. */
-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
- lang = setlocale(LC_MESSAGES, NULL);
-#else
string lang = GetEnv("LC_ALL");
if (lang.empty()) {
lang = GetEnv("LC_MESSAGES");
lang = "C";
}
}
-#endif
string const language = GetEnv("LANGUAGE");
- if (lang != "C" && !language.empty())
+ if (lang != "C" && lang != "POSIX" && !language.empty())
lang = language;
lang = token(lang, '_', 0);