The Battle for Wesnoth  1.15.0-dev
Functions
translation Namespace Reference

Functions

std::string dgettext (const char *domain, const char *msgid)
 
std::string egettext (char const *msgid)
 
std::string dsgettext (const char *domainname, const char *msgid)
 
std::string dsngettext (const char *domainname, const char *singular, const char *plural, int n)
 
void bind_textdomain (const char *domain, const char *directory, const char *)
 
void set_default_textdomain (const char *domain)
 
void set_language (const std::string &language, const std::vector< std::string > *)
 
int compare (const std::string &s1, const std::string &s2)
 Case-sensitive lexicographical comparison. More...
 
int icompare (const std::string &s1, const std::string &s2)
 Case-insensitive lexicographical comparison. More...
 
std::string strftime (const std::string &format, const std::tm *time)
 
static UNUSEDNOWARN std::string gettext (const char *str)
 
static UNUSEDNOWARN std::string sgettext (const char *str)
 
static UNUSEDNOWARN std::string sngettext (const char *str1, const char *str2, int n)
 

Function Documentation

◆ bind_textdomain()

void translation::bind_textdomain ( const char *  domain,
const char *  directory,
const char *   
)

◆ compare()

int translation::compare ( const std::string &  s1,
const std::string &  s2 
)

◆ dgettext()

std::string translation::dgettext ( const char *  domain,
const char *  msgid 
)

Definition at line 393 of file gettext.cpp.

References get_locale().

Referenced by dsgettext(), gui2::get_hp_tooltip(), and gettext().

◆ dsgettext()

std::string translation::dsgettext ( const char *  domainname,
const char *  msgid 
)

◆ dsngettext()

std::string translation::dsngettext ( const char *  domainname,
const char *  singular,
const char *  plural,
int  n 
)

Definition at line 417 of file gettext.cpp.

References get_locale().

Referenced by _n(), sngettext(), t_string_base::str(), and vngettext_impl().

◆ egettext()

std::string translation::egettext ( char const *  msgid)

Definition at line 398 of file gettext.cpp.

References get_locale(), and gettext().

Referenced by attack_type::attack_type().

◆ gettext()

static UNUSEDNOWARN std::string translation::gettext ( const char *  str)
inlinestatic

◆ icompare()

int translation::icompare ( const std::string &  s1,
const std::string &  s2 
)

◆ set_default_textdomain()

void translation::set_default_textdomain ( const char *  domain)

Definition at line 441 of file gettext.cpp.

References LOG_G.

Referenced by test_utils::game_config_manager::game_config_manager(), init_locale(), and sngettext().

◆ set_language()

void translation::set_language ( const std::string &  language,
const std::vector< std::string > *   
)

◆ sgettext()

static UNUSEDNOWARN std::string translation::sgettext ( const char *  str)
inlinestatic

◆ sngettext()

static UNUSEDNOWARN std::string translation::sngettext ( const char *  str1,
const char *  str2,
int  n 
)
inlinestatic

◆ strftime()

std::string translation::strftime ( const std::string &  format,
const std::tm *  time 
)