23 lines
548 B
C++
23 lines
548 B
C++
#include "Index.h"
|
|
#include "zh_cn.h"
|
|
#include "en_us.h"
|
|
#include "string"
|
|
std::string Index::Lang(const char* str) {
|
|
try {
|
|
if(Language == 0){
|
|
if(zh_cn::Zh_Cn.contains(str)) {
|
|
const std::string str_t = zh_cn::Zh_Cn[str];
|
|
return str_t;
|
|
}
|
|
}
|
|
else if(Language == 1){
|
|
if(en_us::En_Us.contains(str)) {
|
|
const std::string str_t = en_us::En_Us[str];
|
|
return str_t;
|
|
}
|
|
}
|
|
}
|
|
catch (...){}
|
|
return "";
|
|
}
|