update
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#ifndef LOCALIZATION_H
|
||||
#define LOCALIZATION_H
|
||||
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
|
||||
class YamlNode;
|
||||
|
||||
class Localization {
|
||||
public:
|
||||
static Localization& instance();
|
||||
|
||||
bool loadFile(const QString &filePath);
|
||||
QString get(const QString &key, const QString &defaultVal = "") const;
|
||||
|
||||
private:
|
||||
Localization();
|
||||
~Localization() = default;
|
||||
|
||||
void flattenNode(const YamlNode &node, const QString &prefix);
|
||||
|
||||
QMap<QString, QString> m_strings;
|
||||
bool m_loaded;
|
||||
};
|
||||
|
||||
#endif // LOCALIZATION_H
|
||||
Reference in New Issue
Block a user