Skip to content
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

feat(unplugin-vue-i18n): provide list of supported locales #251

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lukashass
Copy link

@lukashass lukashass commented Mar 26, 2023

Closes #205

@yooouuri
Copy link

would love this feature!

@lukashass
Copy link
Author

@kazupon Have you seen this? What do you think? 🙈

@@ -815,7 +817,8 @@ const mergeDeep = (target, ...sources) => {

export default mergeDeep({},
${codes.map(code => `{${code}}`).join(',\n')}
);`
);
export const SUPPORTED_LOCALES = ${JSON.stringify(locales)};`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer to support loaded locales with the API implemented in vue-i18n, not with constants exported in virtual modules.

vue-i18n keeps the locale internally. If the API is provided on the virtual module side, locales conflicts may occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide list of supported locales when lazy loading
3 participants