#include "gettext.h"
#include "messages.h"
-
+#include "support/environment.h"
+#include "support/docstring.h"
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
+using lyx::support::setEnv;
+using lyx::docstring;
+
using std::string;
} // anon namespace
-string const _(string const & str)
+docstring const _(string const & str)
{
return getLyXMessages().get(str);
}
+docstring const _(docstring const & str)
+{
+ return getLyXMessages().get(lyx::to_utf8(str));
+}
+
+
#ifdef ENABLE_NLS
void locale_init()
{
+ // Disable, as otherwise it overrides everything else incl. the doc language
+ setEnv("LANGUAGE", "");
# ifdef HAVE_LC_MESSAGES
setlocale(LC_MESSAGES, "");
# endif