19#ifndef TRANSLATION_HPP 
   20#define TRANSLATION_HPP 
   31#include "tinygettext/tinygettext.hpp" 
   34#ifdef STK_UTF8_GETTEXT 
   35#define STK_GETTEXT gettext 
   36#define STK_NGETTEXT ngettext 
   38#define STK_GETTEXT w_gettext 
   39#define STK_NGETTEXT w_ngettext 
   42#  define _(String, ...)        (StringUtils::insertValues(translations->STK_GETTEXT(String), ##__VA_ARGS__)) 
   45#  define _C(Ctx, String, ...)  (StringUtils::insertValues(translations->STK_GETTEXT(String, Ctx), ##__VA_ARGS__)) 
   46#  define _P(Singular, Plural, Num, ...) (StringUtils::insertValues(translations->STK_NGETTEXT(Singular, Plural, Num), Num, ##__VA_ARGS__)) 
   47#  define _CP(Ctx, Singular, Plural, Num, ...) (StringUtils::insertValues(translations->STK_NGETTEXT(Singular, Plural, Num, Ctx), Num, ##__VA_ARGS__)) 
   48#  define gettext_noop(String)  (String) 
   49#  define N_(String)            (gettext_noop (String)) 
   51#  if defined(WIN32) && !defined(__CYGWIN__) 
   59    tinygettext::DictionaryManager m_dictionary_manager;
 
   60    tinygettext::Dictionary*       m_dictionary;
 
   62    static std::map<std::string, std::string> m_localized_name;
 
   63    static std::map<std::string, std::map<std::string, irr::core::stringw> > m_localized_country_codes;
 
   64    std::string m_current_language_name;
 
   65    std::string m_current_language_name_code;
 
   66    std::string m_current_language_tag;
 
   73    irr::core::stringw 
w_gettext(
const wchar_t* original, 
const char* context=NULL);
 
   74    irr::core::stringw 
w_gettext(
const char* original, 
const char* context=NULL);
 
   75    std::string 
gettext(
const char* original, 
const char* context=NULL);
 
   77    irr::core::stringw 
w_ngettext(
const wchar_t* singular, 
const wchar_t* plural, 
int num, 
const char* context=NULL);
 
   78    irr::core::stringw 
w_ngettext(
const char* singular, 
const char* plural, 
int num, 
const char* context=NULL);
 
   79    std::string 
ngettext(
const char* singular, 
const char* plural, 
int num, 
const char* context=NULL);
 
   82    const std::vector<std::string>* getLanguageList() 
const;
 
   84    std::set<unsigned int>   getCurrentAllChar();
 
   86    std::string              getCurrentLanguageName();
 
   88    std::string              getCurrentLanguageNameCode();
 
   90    const std::string        getLocalizedName(
const std::string& str) 
const;
 
   92    irr::core::stringw       getLocalizedCountryName(
const std::string& country_code) 
const;
 
   94    void                     insertThaiBreakMark(
const std::u32string& thai, std::vector<bool>& breakable);
 
Definition: translation.hpp:56
 
irr::core::stringw w_ngettext(const wchar_t *singular, const wchar_t *plural, int num, const char *context=NULL)
Definition: translation.cpp:675
 
irr::core::stringw w_gettext(const wchar_t *original, const char *context=NULL)
Definition: translation.cpp:592
 
std::string ngettext(const char *singular, const char *plural, int num, const char *context=NULL)
Definition: translation.cpp:722
 
std::string gettext(const char *original, const char *context=NULL)
Definition: translation.cpp:641