LunaTranslator/cpp/LunaHook/Lang/Lang_private.h

20 lines
602 B
C
Raw Normal View History

2024-12-16 01:48:39 +08:00
#include "Lang.h"
#include <unordered_map>
#include <string>
enum SUPPORT_LANG
{
Chinese,
TradChinese,
English,
Russian,
};
#define DEFINEFUNCTION(type, mp, ret) \
const ret *langhelper::operator[](type langstring) \
{ \
auto &&_ = mp[langstring]; \
auto &&__ = _.find(curr_lang); \
if (__ == _.end()) \
__ = _.find(English); \
return __->second; \
}