joeplaa-com / joeplaa-homepage

joeplaa.com website build with Gatsby, MDX and Bootstrap.
MIT License
0 stars 0 forks source link

Add multi language option #10

Open joeplaa opened 4 years ago

joeplaa commented 4 years ago

The site is currently in English. I want to have most parts in Dutch too. Blog posts can stay in English only.

joeplaa commented 3 years ago

joeplaa: translate to dutch

joeplaa commented 2 years ago

Which library

https://stackoverflow.com/questions/43460158

Why LinguiJS over React-intl

https://lingui.js.org/tutorials/react.html https://lingui.js.org/misc/react-intl.html

LinguiJS in Gatsby

https://www.gatsbyjs.com/plugins/gatsby-theme-i18n-lingui/?=i18n https://github.com/lingui/js-lingui

I tried implementing LinguiJS, but the extract script failed because it couldn't parse typescript. Adding typescript support yielded a babel-preset error (not allowed to export functions or something like that). Than tried to implement i18next, but couldn't get past the importing mdx stage. Gatsby complained about non-existing allMdx. Rewriting it to allFile as used in all the examples yielded the same error, but this time with keys inside allFile. I gave up.