Open zasuh opened 4 years ago
Hi @zasuh! I suggest using react-i18next for this kind of translation (https://react.i18next.com/). The scope of this plugin is to translate pages based on the filename. Please let me know if it works.
@hugomn Hello! Thank you for the response! I ended up fixing my problem by using gatsby-plugin-intl
, but am now back at looking into gatsby-plugin-l18n
because I need to translate .mdx
files. Does this plugin offer that?
Hi @zasuh, I believe mdx files work in the same way. ;)
@hugomn are you referring to gatsby-plugin-intl
or gatsby-plugin-l18n
? Do you maybe have an example?
What are the best practices for translating components? For instance I have a header component where I would like to translate 'Contact' and 'Biography' to a different language: