-
-
Notifications
You must be signed in to change notification settings - Fork 500
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 json files after generating static files #31
Comments
Even if I run "npm run build" and then "npm run start" i see the same behaviour. |
If load the files not asynchrously it works:
|
I think it's similar to my problem discussing in #23 . |
@mahmoudmy I downloaded your repo and was running it. Could find any issue? How to you build it? I run it with npm run dev. and it was showing first page in english. when i click on house it changed to arabic. |
Thanks @elpeyotl . The first page wasn't in English, it just shows the message keys (CAPITAL LETTERS) and this is the bug! |
If I change your config file like this it works. But it not asynchrous anymore.
Probably you can use that as a workaround? Dont know why on inital load the language is not loaded. I have exact the same issue. |
Same problem here. It works in dev mode, but not in production ( |
Hi guys, sorry for this frustrating issue. Hopefully it's fixed in v2.3.4. |
Looks like the bug is fixed. Thank you, Paul! But there is another (rare) edge case. Will open up a new issue for it in a second |
Hello!
I was trying around a bit if I can use this plugin for my next project. It is awsome by the way. Could set up routing and translation in about 40 minutes! yay!
But I found one issue. When using "npm run generate" to generate static files - the first page load does not show the translations! If I change the language it starts working. It seems that on inital load the json language file is not working. Does anybody have any clue how i can solve that?
I made a git repo here https://github.com/elpeyotl/nuxt-translation. attached a screenshot of the behaviour.
Well it is only not working when generating static pages. In npn run dev it is working.
my config
module.exports = { modules: [ ['nuxt-i18n', { locales: [ { code: 'en', iso: 'en-US', name: 'English', langFile: 'en-US.json' }, { code: 'fr', iso: 'fr-FR', name: 'Français', langFile: 'fr-FR.json' }, { code: 'de', iso: 'de-DE', name: 'Deutsch', langFile: 'de-DE.json' } ], loadLanguagesAsync: true, langDir: 'lang/', defaultLocale: 'en', // ... }] ] }
The text was updated successfully, but these errors were encountered: