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

Distinguish between default display/redirect language and default messages language #167

Open
patspam opened this issue Jan 8, 2021 · 0 comments

Comments

@patspam
Copy link

patspam commented Jan 8, 2021

This plugin conflates two different types "default languages" concepts:

  • The language you want to display/redirect to when the user visits /
  • The language that your codebase is written in (which JSON messages filereact-intl should read default messages from)

gatsby-plugin-intl assumes these are both the same, but this is not always true.

For example, strings in my codebase are written in en-GB (because our dev team is in Australia), but the default language for our site is en-US (because it's a global site and US is the bigger market).

ie. I want to be able to tell gatsby-plugin-intl to use en-US as the default language when the user visits / (and possibly redirect to /en-US/, but use en-GB.json as the default messages file when a translated string is not available.

@patspam patspam changed the title Distinguish between defaultLanguage and Distinguish between default display/redirect language and default messages language Jan 8, 2021
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

No branches or pull requests

1 participant