joostdecock / website

A work in progress to build a new freesewing.org website
MIT License
5 stars 7 forks source link

i18n: Add support for internationalisation #3

Closed joostdecock closed 6 years ago

joostdecock commented 6 years ago

Our current website is available in different languages, so we'll need to support that in the new site too. This falls apart in three aspects:

Routing

Languages are currently determined by a language code in the URL, with the default (en) not using a code. For example /about/ is English, whereas /fr/about/ is the French version of that same page.

Unfortunately, while there is an i18n plugin for Gatsby, it doesn't seem to be all that great and this might require some work.

Translation of content

This is relatively straightforward. /about can be an English markdown page, and /fr/about a French one.

Translation of the interface

Here, there's a number of options. We can use a fully-featured package such as react-intl or implement something more minimalistic. A few requirements from the top of my head:

joostdecock commented 6 years ago

I think we've covered everything. There might be some more subtle issues, but I'm closing this as the current site is working with multi-lingual markdown content, and react-intl for translation