You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
patspam
changed the title
Distinguish between defaultLanguage and
Distinguish between default display/redirect language and default messages language
Jan 8, 2021
This plugin conflates two different types "default languages" concepts:
/
react-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 isen-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 useen-US
as the default language when the user visits/
(and possibly redirect to/en-US/
, but useen-GB.json
as the default messages file when a translated string is not available.The text was updated successfully, but these errors were encountered: