SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Translations Class Reference

Public Member Functions

irr::core::stringw w_gettext (const wchar_t *original, const char *context=NULL)
 
irr::core::stringw w_gettext (const char *original, const char *context=NULL)
 
std::string gettext (const char *original, const char *context=NULL)
 
irr::core::stringw w_ngettext (const wchar_t *singular, const wchar_t *plural, int num, const char *context=NULL)
 
irr::core::stringw w_ngettext (const char *singular, const char *plural, int num, const char *context=NULL)
 
std::string ngettext (const char *singular, const char *plural, int num, const char *context=NULL)
 
const std::vector< std::string > * getLanguageList () const
 
std::set< unsigned int > getCurrentAllChar ()
 
std::string getCurrentLanguageName ()
 
std::string getCurrentLanguageNameCode ()
 
const std::string getLocalizedName (const std::string &str) const
 
irr::core::stringw getLocalizedCountryName (const std::string &country_code) const
 
void insertThaiBreakMark (const std::u32string &thai, std::vector< bool > &breakable)
 

Private Attributes

tinygettext::DictionaryManager m_dictionary_manager
 
tinygettext::Dictionary * m_dictionary
 
std::string m_current_language_name
 
std::string m_current_language_name_code
 
std::string m_current_language_tag
 

Static Private Attributes

static std::map< std::string, std::string > m_localized_name
 
static std::map< std::string, std::map< std::string, irr::core::stringw > > m_localized_country_codes
 

Member Function Documentation

◆ gettext()

std::string Translations::gettext ( const char *  original,
const char *  context = NULL 
)
Parameters
originalMessage to translate
contextOptional, can be set to differentiate 2 strings that are identical in English but could be different in other languages

◆ ngettext()

std::string Translations::ngettext ( const char *  singular,
const char *  plural,
int  num,
const char *  context = NULL 
)
Parameters
singularMessage to translate in singular form
pluralMessage to translate in plural form (can be the same as the singular form)
numCount used to obtain the correct plural form.
contextOptional, can be set to differentiate 2 strings that are identical in English but could be different in other languages

◆ w_gettext() [1/2]

irr::core::stringw Translations::w_gettext ( const char *  original,
const char *  context = NULL 
)
Parameters
originalMessage to translate
contextOptional, can be set to differentiate 2 strings that are identical in English but could be different in other languages

◆ w_gettext() [2/2]

irr::core::stringw Translations::w_gettext ( const wchar_t *  original,
const char *  context = NULL 
)
Parameters
originalMessage to translate
contextOptional, can be set to differentiate 2 strings that are identical in English but could be different in other languages

◆ w_ngettext() [1/2]

irr::core::stringw Translations::w_ngettext ( const char *  singular,
const char *  plural,
int  num,
const char *  context = NULL 
)
Parameters
singularMessage to translate in singular form
pluralMessage to translate in plural form (can be the same as the singular form)
numCount used to obtain the correct plural form.
contextOptional, can be set to differentiate 2 strings that are identical in English but could be different in other languages

◆ w_ngettext() [2/2]

irr::core::stringw Translations::w_ngettext ( const wchar_t *  singular,
const wchar_t *  plural,
int  num,
const char *  context = NULL 
)
Parameters
singularMessage to translate in singular form
pluralMessage to translate in plural form (can be the same as the singular form)
numCount used to obtain the correct plural form.
contextOptional, can be set to differentiate 2 strings that are identical in English but could be different in other languages

The documentation for this class was generated from the following files: