-
-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy-load translations #23
Comments
I tried the new release. |
@mahmoudmy that's weird 😮 |
Here is my config: {
locales: [{
code: 'fa',
iso: 'fa-IR',
name: 'فارسی'
}, {
code: 'en',
iso: 'en-US',
name: 'English'
}],
defaultLocale: 'fa',
vueI18n: {
fallbackLocale: 'fa',
silentTranslationWarn: true
},
loadLanguagesAsync: true,
langDir: 'locales/',
langFiles: {
fa: 'fa.js',
en: 'en.js'
}
} |
Thanks @mahmoudmy ! I tried your config in my example project and it seems to be working okay. Any way you could provide a repo with the issue so I can reproduce? |
Thanks @paulgv , I created a simple repo resulting the same problem: |
Thanks! I'm not sure what's going on there, I need to give it a closer look. I released another version where |
@mahmoudmy did you find a solution to your problem by any chance? I've been messing around with your repo and couldn't make it work properly, even after stripping it down to the bare minimum. But using a similar setup in another Nuxt project works fine so this feels pretty strange... |
I also tried the new version (2.3.0), but the problem still exists! |
@paulgv |
@mahmoudmy apparently, nuxt-i18n's plugin was missing a simple |
Thanks @paulgv , You made my day ;) |
Lazy-loading translations seems like an important feature to some of us.
An initial implementation is available in version 2.3.0 which is tagged as a pre-release. I'd love to have some feedback from you guys if you'd be willing to give it a try.
To get the prerelease:
Have a look at the doc for usage: https://github.com/nuxt-community/nuxt-i18n#lazy-load-translations
Thanks!
#20
#7
The text was updated successfully, but these errors were encountered: