简述:
此 库基于VS2015++ win10sdk 开发封装,用于QT/MFC平台下的多国语言切换库,
需结合poedit进行编辑语言资源,使用起来极为简单,支持中文简繁体;
typedef enum LANGTYPES
{
WXLANGUAGE_UNKNOW = -1,
wxLANGUAGE_CHINESE_SIMPLIFIED=0,
wxLANGUAGE_CHINESE_TAIWAN=1,
wxLANGUAGE_ENGLISH=2,
wxLANGUAGE_GERMAN=3,
wxLANGUAGE_RUSSIAN=4,
wxLANGUAGE_JAPANESE=5,
};
#define _(s) (wxL->wxGetTranslation(_T(s)))
class LIBTRANS_INTER_API wxLocale
{
public:
wxLocale();
wxLocale(int nLanguage);
~wxLocale();
std::wstring wxGetTranslation(std::wstring szOrigString) const; //提取poedit中的字符
int GetLanguage();
void resetLocale(int nLanguage);
bool AddCatalog(std::wstring szDomain);
static wxLocale* ginstance();
private:
std::shared_ptr<void> mLocal;
};
#define wxL wxLocale::ginstance()
下载地址: