gatsby-plugin-react-i18next
gatsby-plugin-react-i18next copied to clipboard
How to handle Nested Routes?
Is there a way to have nested routes works? my page config is like this:
pages: [
{
matchPath: '/:lang?/:uid',
getLanguageFromPath: true,
},
]
paths like \section and \it\section works correctly
but paths like \section\sub and \it\section\sub are not, these are set as en pages and have the routed flag set true
instead it\it\section\sub is created as a new path for it language
is it possible to workaround this? maybe with a different regex for matchPath?
adding a new entry in the pages config make the nested route work but it is not nice
pages: [
{
matchPath: '/:lang?/section/:uid',
getLanguageFromPath: true,
},
{
matchPath: '/:lang?/:uid',
getLanguageFromPath: true,
},
]