41 #include <boost/locale/info.hpp>
43 #ifndef GETTEXT_DOMAIN
44 # define GETTEXT_DOMAIN PACKAGE
49 # define GETTEXT_DOMAIN ""
54 std::string
dgettext(
const char* domain,
const char* msgid);
56 std::string
dsgettext(
const char * domainname,
const char *msgid);
58 std::string
dsngettext(
const char * domainname,
const char *singular,
const char *plural,
int n);
60 [[maybe_unused]]
inline static std::string
gettext(
const char* str)
62 [[maybe_unused]]
inline static std::string
sgettext(
const char* str)
64 [[maybe_unused]]
inline static std::string
sngettext(
const char* str1,
const char* str2,
int n)
68 void bind_textdomain(
const char* domain,
const char* directory,
const char* encoding);
71 void set_language(
const std::string& language,
const std::vector<std::string>* alternates);
74 int compare(
const std::string& s1,
const std::string& s2);
77 int icompare(
const std::string& s1,
const std::string& s2);
79 std::string
strftime(
const std::string&
format,
const std::tm* time);
81 bool ci_search(
const std::string& s1,
const std::string& s2);
93 [[maybe_unused]]
inline static std::string
_(
const char* str)
97 [[maybe_unused]]
inline static std::string
_n(
const char* str1,
const char* str2,
int n)
100 #define gettext_noop(String) String
101 #define N_(String) gettext_noop (String)
102 #define N_n(String1, String2) String1, String2
#define GETTEXT_DOMAIN
How to use gettext for wesnoth source files:
static std::string _n(const char *str1, const char *str2, int n)
static std::string _(const char *str)
void set_language(const std::string &language, const std::vector< std::string > *)
std::string egettext(char const *msgid)
static std::string gettext(const char *str)
void bind_textdomain(const char *domain, const char *directory, const char *)
void set_default_textdomain(const char *domain)
int compare(const std::string &s1, const std::string &s2)
Case-sensitive lexicographical comparison.
int icompare(const std::string &s1, const std::string &s2)
Case-insensitive lexicographical comparison.
const boost::locale::info & get_effective_locale_info()
A facet that holds general information about the effective locale.
std::string strftime(const std::string &format, const std::tm *time)
std::string dgettext(const char *domain, const char *msgid)
bool ci_search(const std::string &s1, const std::string &s2)
static std::string sngettext(const char *str1, const char *str2, int n)
std::string dsgettext(const char *domainname, const char *msgid)
std::string dsngettext(const char *domainname, const char *singular, const char *plural, int n)
static std::string sgettext(const char *str)
static map_location::direction n
Some defines: VERSION, PACKAGE, MIN_SAVEGAME_VERSION.