40 #include <boost/locale/info.hpp> 42 #ifndef GETTEXT_DOMAIN 43 # define GETTEXT_DOMAIN PACKAGE 48 # define GETTEXT_DOMAIN "" 53 std::string
dgettext(
const char* domain,
const char* msgid);
55 std::string
dsgettext(
const char * domainname,
const char *msgid);
57 std::string
dsngettext(
const char * domainname,
const char *singular,
const char *plural,
int n);
59 [[maybe_unused]]
inline static std::string
gettext(
const char* str)
61 [[maybe_unused]]
inline static std::string
sgettext(
const char* str)
63 [[maybe_unused]]
inline static std::string
sngettext(
const char* str1,
const char* str2,
int n)
67 void bind_textdomain(
const char* domain,
const char* directory,
const char* encoding);
73 int compare(
const std::string& s1,
const std::string& s2);
76 int icompare(
const std::string& s1,
const std::string& s2);
78 std::string
strftime(
const std::string&
format,
const std::tm* time);
80 bool ci_search(
const std::string& s1,
const std::string& s2);
92 [[maybe_unused]]
inline static std::string
_(
const char* str)
96 [[maybe_unused]]
inline static std::string
_n(
const char* str1,
const char* str2,
int n)
99 #define gettext_noop(String) String 100 #define N_(String) gettext_noop (String) static std::string _n(const char *str1, const char *str2, int n)
void bind_textdomain(const char *domain, const char *directory, const char *)
int compare(const std::string &s1, const std::string &s2)
Case-sensitive lexicographical comparison.
void set_language(const std::string &language, const std::vector< std::string > *)
std::string dsngettext(const char *domainname, const char *singular, const char *plural, int n)
std::string dgettext(const char *domain, const char *msgid)
static std::string _(const char *str)
std::string dsgettext(const char *domainname, const char *msgid)
std::string strftime(const std::string &format, const std::tm *time)
void set_default_textdomain(const char *domain)
static std::string sngettext(const char *str1, const char *str2, int n)
std::string egettext(char const *msgid)
bool ci_search(const std::string &s1, const std::string &s2)
Some defines: VERSION, PACKAGE, MIN_SAVEGAME_VERSION.
static std::string gettext(const char *str)
#define GETTEXT_DOMAIN
How to use gettext for wesnoth source files:include this header file in the .cpp filemake sure...
int icompare(const std::string &s1, const std::string &s2)
Case-insensitive lexicographical comparison.
static std::string sgettext(const char *str)
static map_location::DIRECTION n
const boost::locale::info & get_effective_locale_info()
A facet that holds general information about the effective locale.