Open EricCote opened 2 years ago
I was thinking the same thing. I even considered recreating the whole i18n logic to be able to use the new version of MDX. I don't know if that's the best solution, but I independently made an identical change in my local repo, and it worked.
I published a fork of the i18n packages. (I needed that since this project doesn't seem to be updated anymore.) You can get them all here:
Source code with example is here, but on branch "publish-fork": https://github.com/ericcote/themes/tree/publish-fork
If this can help someone, I am happy about that...
@LekoArts, do you know if there are plans for a better i18n story with Gatsby v5?
It seems like it, unfortunately. Thanks. I'll check them out in my free time.
I published a fork of the i18n packages. (I needed that since this project doesn't seem to be updated anymore.) You can get them all here:
- https://www.npmjs.com/package/@ericcote/gatsby-theme-i18n-react-intl
- https://www.npmjs.com/package/@ericcote/gatsby-theme-i18n-react-i18next
- https://www.npmjs.com/package/@ericcote/gatsby-theme-i18n
Source code with example is here, but on branch "publish-fork": https://github.com/ericcote/themes/tree/publish-fork
If this can help someone, I am happy about that...
@LekoArts, do you know if there are plans for a better i18n story with Gatsby v5?
You save my day.
The new gatsby-plugin-mdx v4 has a lot of internal changes and new features.
Because of these internal changes, gatsby-theme-i18n fails to add the locale for
.mdx
files. Luckily, the fix is easy.The error is in the
gatsby-node.js
file, on line 126.Old Line:
New Line:
I'll do a pull request