[mod] init:localization
This commit is contained in:
parent
1d4ee08b06
commit
3ca3cabb9e
|
|
@ -54,17 +54,26 @@ namespace _dali
|
|||
{"kind": "console", "data": {"threshold": "info"}},
|
||||
]
|
||||
);
|
||||
await lib_plankton.translate.initialize(
|
||||
{
|
||||
"verbosity": 1,
|
||||
"packages": [
|
||||
JSON.parse(await lib_plankton.file.read("data/localization/deu.loc.json")),
|
||||
JSON.parse(await lib_plankton.file.read("data/localization/eng.loc.json")),
|
||||
],
|
||||
"order": ["deu", "eng"],
|
||||
"autopromote": false,
|
||||
}
|
||||
);
|
||||
// init:localization
|
||||
{
|
||||
const order : Array<string> = ["deu", "eng"];
|
||||
await lib_plankton.translate.initialize(
|
||||
{
|
||||
"verbosity": 1,
|
||||
"packages": await Promise.all(
|
||||
order.map(
|
||||
async (code) => JSON.parse(
|
||||
await lib_plankton.file.read(
|
||||
"data/localization/" + code + ".loc.json"
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
"order": order,
|
||||
"autopromote": false,
|
||||
}
|
||||
);
|
||||
}
|
||||
await _dali.backend.initialize(
|
||||
_dali.conf.get()["backend"]
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue