We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f22ab4 commit 9b220c3Copy full SHA for 9b220c3
src/templates/utils.js
100644
100755
@@ -20,7 +20,7 @@ export async function loadLanguageAsync (i18n, locale) {
20
try {
21
const module = await import(/* webpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file)
22
const messages = module.default ? module.default : module
23
- i18n.setLocaleMessage(locale, messages)
+ i18n.setLocaleMessage(locale, typeof messages === 'function' ? await Promise.resolve(messages()) : messages)
24
i18n.loadedLanguages.push(locale)
25
return messages
26
} catch (error) {
0 commit comments