Add translation support using i18next
Description
Minimal version of #681. Allows follow up PRs which add languages, translate components, language switcher or translator platform.
Fixes #164
Following https://locize.com/blog/react-i18next/
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.
I have read the CLA Document and I hereby sign the CLA
@ajbura @kfiven can I get some feedback on this PR? :)
@aceArt-GmbH is possible with this to translate ? i would like to provide Portuguese ( PT-PT ) translation
@aceArt-GmbH is possible with this to translate ? i would like to provide Portuguese ( PT-PT ) translation
This is the initial part needed for translation. There are followup PRs (#1590, #1591, ...) which actually translate the keys in Cinny. So you could prepare a Portuguese translation, but as none of this is merged yet, you might have to redo some translations
Hey,
We were planing to add translation after next release because Cinny is undergoing major TS refactor. So if you are added translation please keep it to only.ts files as much as possible, because other stuff is going to change repeatedly.
this PR is only the general setup, so it should be fine for merge. It would allow the refactored files to be translated
The other PRs already contain translations of js files. Merging them wouldn't hurt, as the work is already done anyways. And you can copy the keys on refactor
We could include a cache bust via queryStringParams: { v: cons.version },
Preview: https://1576--pr-cinny.netlify.app ⚠️ Exercise caution. Use test accounts. ⚠️
Rebased and updated dependencies. So this is once again mergable
Everything looks good to me.
I think we should also add language switcher in user settings so people can switch language of their choice without depending on system-language.
If you are fine with it, I would leave this to someone else and a separate PR
Ok I will probably add it in another PR. Sorry for the review stuck so long behind refactor.
Thanks for working on this!