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

[Feature request] update the logic in createConfig to not check locales via the fs when they are covered with a fallback #1652

Closed
Sin1tar opened this issue Jan 25, 2022 · 2 comments
Labels

Comments

@Sin1tar
Copy link

Sin1tar commented Jan 25, 2022

Is your feature request related to a problem? Please describe.

#1649

it would be really great to be able to define multiple routes that will have a translation from the same entry point.

so if we define in next-i18next.config.js

module.exports = {
  fallbackLng: {
    'en-CA': ['en'],
    'en-DE': ['en'],
    'it-CA': ['it'],
    'it-DE': ['it'],
    'default': ['en'],
  },
  i18n: {
    defaultLocale: 'en',
    locales: [
      'en-CA',
      'en-DE',
      'en',
      'it-CA',
      'it-DE',
      'it',
    ],
  },
}

then these routes will get translation from the one entry point instead of hard fs cover:
/en-CA (now: public\locales\en-CA) (need: public\locales\en)
/en-DE (now: public\locales\en-DE) (need: public\locales\en)
/en

/it-CA (now: public\locales\it-CA) (need: public\locales\it)
/it-DE (now: public\locales\it-CA) (need: public\locales\it)
/it

Thank you

@Sin1tar Sin1tar changed the title update the logic in createConfig to not check locales via the fs when they are covered with a fallback [Feature request] update the logic in createConfig to not check locales via the fs when they are covered with a fallback Jan 25, 2022
@isaachinman
Copy link
Contributor

Fix should be handled as described here.

PRs would be very welcome!

@stale
Copy link

stale bot commented Jul 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 10, 2022
@stale stale bot closed this as completed Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants