扩展多语言模块,支持通过oops-plugin-excel-to-json插件导入Excel配置表中的多语言配置数据

This commit is contained in:
dgflash
2023-08-22 16:43:26 +08:00
parent d1abd35d01
commit 0d53fbda0a
6 changed files with 488 additions and 394 deletions

View File

@@ -0,0 +1 @@
{"role_level_up":{"zh":"升级","en":"Upgrade"},"role_attack":{"zh":"攻击","en":"Attack"}}

View File

@@ -0,0 +1,11 @@
{
"ver": "2.0.0",
"importer": "json",
"imported": true,
"uuid": "b92e9be8-b6df-4e15-8b4b-16326a243229",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
import { JsonUtil } from "../../../../../extensions/oops-plugin-framework/assets/core/utils/JsonUtil";
export class TableLanguage {
static TableName: string = "Language";
private data: any;
init(id: number) {
var table = JsonUtil.get(TableLanguage.TableName);
this.data = table[id];
this.id = id;
}
/** 编号【KEY】 */
id: number = 0;
/** 简体中文 */
get zh(): string {
return this.data.zh;
}
/** 英文 */
get en(): string {
return this.data.en;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "290f6330-3789-4738-a324-70369ca98be5",
"files": [],
"subMetas": {},
"userData": {}
}

BIN
excel/Language.xlsx Normal file

Binary file not shown.