feat: add runtime i18n API with manifest translations
This commit is contained in:
@@ -22,4 +22,10 @@ abstract interface class ScriptEngine {
|
||||
GameDiff init(Map<String, Object?> context);
|
||||
|
||||
GameDiff dispatchEvent(RuntimeEvent event);
|
||||
|
||||
/// 设置翻译字典和当前语言,Lua 侧可通过 runtime.i18n.t(key, fallback) 查询。
|
||||
void setTranslations({
|
||||
required String locale,
|
||||
required Map<String, Map<String, String>> translations,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user