This project adds deepl-translate-github-action for automated translations on top of the generated project based off this command
npm create refine-app@latest -- --example i18n-react
This project has also been modified in the header component for users to select different languages aside from the default EN and DE languages.
To add a new language to your app,
- go to
src/i18n.ts
and add tofallbackLng
andsupportedLngs
arrays. - add your language to country code map in
simpleLangToCountryMap
at the header component - add the corresponding country image to
public/images/flags/{country_code}.svg
. You can find the entire list of possible country flag images here. - then in the deepl-translate-github-action workflow
translate.yml
, add totarget_languages