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 * ====================================================== */
22 # include <libintl.h> // use the header already in the system *EK*
24 # include "../intl/libintl.h"
27 char const * _(char const * str)
29 // I'd rather have an Assert on str, we should not allow
30 // null pointers here. Lgb
39 string const _(string const & str)
42 int const s = str.length();
43 char * tmp = new char[s + 1];
46 string const ret(gettext(tmp));
56 # ifdef HAVE_LC_MESSAGES
57 setlocale(LC_MESSAGES, "");
59 setlocale(LC_CTYPE, "");
60 setlocale(LC_NUMERIC, "C");
63 void gettext_init(string const & localedir)
65 bindtextdomain(PACKAGE, localedir.c_str());
74 setlocale(LC_NUMERIC, "C");
77 void gettext_init(string const &)