28#if GCONFIG_HAVE_GETTEXT
34 void gettext_init(
const std::string & localedir ,
const std::string & name ) ;
43 const char *
gettext(
const char * ) ;
49#if GCONFIG_HAVE_GETTEXT
50inline void G::gettext_init(
const std::string & localedir ,
const std::string & appname )
52 if( !appname.empty() )
54 std::setlocale( LC_MESSAGES ,
"" ) ;
55 std::setlocale( LC_CTYPE ,
"" ) ;
56 if( !localedir.empty() )
57 bindtextdomain( appname.c_str() , localedir.c_str() ) ;
58 textdomain( appname.c_str() ) ;
61inline const char *
G::gettext(
const char * p )
constexpr const char * gettext_noop(const char *p)
Marks a string for translation at build-time, but no translation is applied at run-time.
const char * gettext(const char *)
Returns the message translation in the current locale's codeset, eg.
void gettext_init(const std::string &localedir, const std::string &name)
Initialises the gettext() library.