Open alexgarel opened 2 years ago
@alexfauquette can you tell us, how it's setup in hungergames ?
Of course
You have a github action to keep it up to date here
You can copy past the folder structure (i18n folder) which contains common.json
and after 1 file per locale
I used reacti18n. You can have a look to the get started
I've one file that do the initialization on the all app
It's called in the root index.js as follow
import "./i18n";
After that all your components can have translation as follow:
import { useTranslation } from "react-i18next";
const MyComponent = ()=>{
const { t } = useTranslation();
return <p>{t('myTrabslationKey')}</p>
}
What
Part of
30