Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lyqht/refine-i18n-react
Project showcasing automated translations using deepl-translate-github-action
https://github.com/lyqht/refine-i18n-react
deepl github-actions i18n reactjs refine
Last synced: 7 days ago
JSON representation
Project showcasing automated translations using deepl-translate-github-action
- Host: GitHub
- URL: https://github.com/lyqht/refine-i18n-react
- Owner: lyqht
- Created: 2023-07-24T12:20:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-02T12:52:36.000Z (over 1 year ago)
- Last Synced: 2024-05-01T16:15:46.744Z (7 months ago)
- Topics: deepl, github-actions, i18n, reactjs, refine
- Language: TypeScript
- Homepage: https://refine-i18n-react.vercel.app
- Size: 129 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## refine-i18n-react
This project adds [deepl-translate-github-action](https://github.com/lyqht/deepl-translate-github-action) for automated translations on top of the generated project based off this command
```bash
npm create refine-app@latest -- --example i18n-react
```This project has also been modified in the [header component](src/components/header/index.tsx) for users to select different languages aside from the default EN and DE languages.
## How to add more languages?To add a new language to your app,
1. go to `src/i18n.ts` and add to `fallbackLng` and `supportedLngs` arrays.
2. add your language to country code map in `simpleLangToCountryMap` at the [header component](src/components/header/index.tsx)
3. add the corresponding country image to `public/images/flags/{country_code}.svg`. You can find the entire list of possible country flag images [here](https://flaglog.com/country-codes).
4. then in the deepl-translate-github-action workflow `translate.yml`, add to `target_languages`