-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Hi,
When I set the defaultLanguage to something else than en (I tried with fr and de), I got this behavior:
The Url is redirect to the en url. E.g:
example.com->example.com/enexample.com/mail->example.com/en/mail
When I try to "force" to the default language, I have a page error:
example.com/fr->example.com/en/en/fr-> Not foundexample.com/fr/mail->example.com/en/en/fr/mail
Here is my gatsby-config.ts:
{
resolve: `gatsby-plugin-react-i18next`,
options: {
localeJsonSourceName: `locale`, // name given to `gatsby-source-filesystem` plugin.
languages: ['fr', 'en', 'de'],
defaultLanguage: 'fr',
fallbackLanguage: 'fr',
siteUrl: `${siteUrl}`,
// if you are using trailingSlash gatsby config include it here, as well (the default is 'always')
trailingSlash: 'always',
// you can pass any i18next options
i18nextOptions: {
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},
lowerCaseLng: true,
saveMissing: false,
keySeparator: false,
nsSeparator: false,
},
},
}If I set the defaultLanguage to en, it works as expected.
Metadata
Metadata
Assignees
Labels
No labels