wip
This commit is contained in:
@ -6,15 +6,14 @@ import * as fs from 'fs';
|
||||
import * as yaml from 'js-yaml';
|
||||
|
||||
export type LangKey = 'de' | 'en' | 'fr' | 'ja' | 'pl';
|
||||
export type LocaleObjectChildren = LocaleObject | string | undefined;
|
||||
export type LocaleObject = {[key: string]: LocaleObjectChildren };
|
||||
export type LocaleObject = { [key: string]: any };
|
||||
|
||||
const loadLang = (lang: LangKey) => yaml.safeLoad(
|
||||
fs.readFileSync(`./locales/${lang}.yml`, 'utf-8')) as LocaleObject;
|
||||
|
||||
const native = loadLang('ja');
|
||||
|
||||
const langs: {[key in LangKey]: LocaleObject} = {
|
||||
const langs: { [key: string]: LocaleObject } = {
|
||||
'de': loadLang('de'),
|
||||
'en': loadLang('en'),
|
||||
'fr': loadLang('fr'),
|
||||
|
Reference in New Issue
Block a user