add extensions and locales

This commit is contained in:
jfh
2020-08-24 01:23:00 +02:00
parent f542676098
commit 5b6e3fef8e
481 changed files with 144942 additions and 86993 deletions

View File

@@ -384,8 +384,7 @@ export const putLocale = async function (givenParam, goodLangs, conf) {
if (!goodLangs.includes(langParam) && langParam !== 'test') {
langParam = 'en';
}
const url = conf.langPath + 'lang.' + langParam + '.js';
const url = `${conf.langPath}lang.${langParam}.js`;
// eslint-disable-next-line node/no-unsupported-features/es-syntax
const module = await import(url);
return readLang(module.default);