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: allow multiple locales under a single domain #1461

Conversation

MarcoBomfim
Copy link

This PR is still a WIP. I'm working on implementing the feature mentioned on #1161 based on the work by lfglopes. Since there were quite a few updates after this issue first got worked on, there are some things that still need some work, as well as some refactor once I'm done.

Checklist before movinfg this PR to ready-to-review:

  • Fix switchLocalePath when switching languages so it points to newdomain + path instead of currentdomain + locale-code + path.
  • Fix tests that are failing probably due to the above
  • Add tests to new feature
  • Fix missing types
  • Update documentation

@@ -145,7 +157,11 @@ export function makeRoutes (baseRoutes, {
)

if (shouldAddPrefix) {
path = `/${locale}${path}`
path = `/${locale.code}${path}`
Copy link
Author

Choose a reason for hiding this comment

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

When running no-lang-switcher, locale.code is undefined, so I have to figure out a way of checking the type of locale (object for multiple-locales, and string for no-lang-switcher

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.

None yet

1 participant