Skip to content

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

@patspam

Description

@patspam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions