-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Default locale should be loaded from main bundle #818
Comments
This avoid extra request for the locale that is always needed anyway. Resolves #818
What if the user's language doesn't match defaulLocale, in this case, in main.bundle will find the unnecessary language. Maybe we should inject JSON with current user language to the page via nuxtState, this way you can avoid an unnecessary Ajax request. |
Even if the user's locale is not the default locale, the default locale is needed as it's loaded as a fallback. So there are still benefits to having it in the main bundle.
This is a possible further, separate improvement. |
This avoid extra request for the locale that is always needed anyway. Resolves #818
If the user has specified
defaultLocale
and is usinglazy
option to load messages, the lang file for default locale should be loaded from the main bundle as it's always needed (either for the current locale or to be used as fallback).This was brought up in both #486 and #815.
The text was updated successfully, but these errors were encountered: