1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2001 The LyX Team.
9 * ====================================================== */
19 #include <boost/smart_ptr.hpp>
24 # include <libintl.h> // use the header already in the system *EK*
26 # include "../intl/libintl.h"
29 char const * _(char const * str)
31 // I'd rather have an Assert on str, we should not allow
32 // null pointers here. Lgb
41 string const _(string const & str)
44 int const s = str.length();
45 boost::scoped_array<char> tmp(new char[s + 1]);
46 str.copy(tmp.get(), s);
48 string const ret(gettext(tmp.get()));
58 # ifdef HAVE_LC_MESSAGES
59 setlocale(LC_MESSAGES, "");
61 setlocale(LC_CTYPE, "");
62 setlocale(LC_NUMERIC, "C");
66 void gettext_init(string const & localedir)
68 bindtextdomain(PACKAGE, localedir.c_str());
77 setlocale(LC_NUMERIC, "C");
81 void gettext_init(string const &)