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 * ====================================================== */
18 # include <libintl.h> // use the header already in the system *EK*
20 # include <locale.h> // for LC_MESSAGES
23 # include "../intl/libintl.h"
26 char const * _(char const * str)
28 // I'd rather have an Assert on str, we should not allow
29 // null pointers here. Lgb
38 string const _(string const & str)
41 int const s = str.length();
42 char * tmp = new char[s + 1];
45 string const ret(gettext(tmp));
55 # ifdef HAVE_LC_MESSAGES
56 setlocale(LC_MESSAGES, "");
57 setlocale(LC_CTYPE, "");
58 setlocale(LC_NUMERIC, "C");
62 void gettext_init(string const & localedir)
64 bindtextdomain(PACKAGE, localedir.c_str());
75 void gettext_init(string const &)