mirror of
https://github.com/directus/directus.git
synced 2026-02-06 02:35:03 -05:00
Fixed dynamic translations import. (#9179)
This commit is contained in:
@@ -24,7 +24,7 @@ export async function setLanguage(lang: Language): Promise<boolean> {
|
||||
} else {
|
||||
if (loadedLanguages.includes(lang) === false) {
|
||||
try {
|
||||
const translations = await import(`./translations/${lang}.yaml`);
|
||||
const { default: translations } = await import(`./translations/${lang}.yaml`);
|
||||
i18n.global.mergeLocaleMessage(lang, translations);
|
||||
loadedLanguages.push(lang);
|
||||
} catch (err: any) {
|
||||
|
||||
Reference in New Issue
Block a user