fix: fix I18nAPI.get

This commit is contained in:
Tsubasa6848
2024-05-13 20:09:11 +08:00
Unverified
parent e179c6de29
commit ce6049cfe9
5 changed files with 19 additions and 8 deletions
+8 -1
View File
@@ -161,9 +161,16 @@ void Export_Compatibility_API() {
});
RemoteCall::exportAs(
"GMLIB_API",
"resourcePackTranslate",
"resourcePackDefaultTranslate",
[](std::string key, std::vector<std::string> params) -> std::string { return I18nAPI::get(key, params); }
);
RemoteCall::exportAs(
"GMLIB_API",
"resourcePackTranslate",
[](std::string key, std::vector<std::string> params, std::string code) -> std::string {
return I18nAPI::get(key, params, code);
}
);
RemoteCall::exportAs("GMLIB_API", "chooseResourcePackI18nLanguage", [](std::string code) -> void {
if (GMLIB_Level::getInstance()) {
I18nAPI::chooseLanguage(code);