From 928c1daa559d8b97f5df5af17187358c0c620dd0 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 24 Jun 2008 12:45:57 +0000 Subject: [PATCH] Messages::get(): Add two error messages just in case. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25378 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/Messages.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index 16a286c3d3..b9a5bb5545 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -116,14 +116,18 @@ docstring const Messages::get(string const & m) const if (!lang_.empty()) { // This GNU extension overrides any language locale // wrt gettext. - setEnv("LANGUAGE", lang_); + bool success = setEnv("LANGUAGE", lang_); + if (!success) + LYXERR0("WARNING: Cannot set env LANGUAGE variable to " << lang_); // However, setting LANGUAGE does nothing when the // locale is "C". Therefore we set the locale to // something that is believed to exist on most // systems. The idea is that one should be able to // load German documents even without having de_DE // installed. - setEnv("LC_ALL", "en_US"); + success = setEnv("LC_ALL", "en_US"); + if (!success) + LYXERR0("WARNING: Cannot set env LC_ALL variable to en_US"); #ifdef HAVE_LC_MESSAGES setlocale(LC_MESSAGES, ""); #endif -- 2.39.2