mirror of
https://gitee.com/dgflash/oops-framework.git
synced 2026-06-30 07:24:30 +08:00
扩展多语言模块,支持通过oops-plugin-excel-to-json插件导入Excel配置表中的多语言配置数据
This commit is contained in:
27
assets/script/game/common/table/TableLanguage.ts
Normal file
27
assets/script/game/common/table/TableLanguage.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
9
assets/script/game/common/table/TableLanguage.ts.meta
Normal file
9
assets/script/game/common/table/TableLanguage.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "290f6330-3789-4738-a324-70369ca98be5",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user