mirror of
https://github.com/MountCloud/FireDog.git
synced 2026-10-17 04:31:05 +08:00
28 lines
652 B
C++
28 lines
652 B
C++
#ifndef __FIREKYLIN_GUI_I18N_H__
|
|
#define __FIREKYLIN_GUI_I18N_H__
|
|
#include <QHash>
|
|
#include <qstring.h>
|
|
#include <qvector.h>
|
|
|
|
#define GUI_18N_CONFIG_DIR_NAME "/fdlanguages/"
|
|
#define GUI_18N_CONFIG_FILE_NAME "firedog.i18n.config.json"
|
|
#define GUI_18N_DEFAULT_LANGUAGE "en-us"
|
|
|
|
class Gui18n
|
|
{
|
|
public:
|
|
static Gui18n* GetInstance();
|
|
QString GetNowLanguage();
|
|
//ËùÓеÄÓïÑÔ
|
|
QVector<QString> GetLanguages();
|
|
QString GetConfig(QString name);
|
|
QString GetConfig(QString name, QString defstr);
|
|
void SetLanguage(QString language);
|
|
private:
|
|
QString now_language;
|
|
QHash<QString, QString> configs;
|
|
Gui18n();
|
|
static Gui18n* instance;
|
|
void init();
|
|
};
|
|
#endif |