tusmanakhter / MigrantHub

MIT License
4 stars 3 forks source link

Translate application #141

Closed tusmanakhter closed 5 years ago

tusmanakhter commented 5 years ago

Majority of application has been translated #133.

App has been translated to french. Users can right click the app in google chrome and click translate to translate it to a different language. Google does not provide a translation widget anymore.

Many sentences were translated using Google Translate, might not make 100% sense. Using react-intl package to load translations. Storing users language selection in browser cookies using react-cookie. Using reacts context feature to allow all pages to know which language is selected. Majority of app was translated except pages that are currently being modified or are too messy.

Language can be passed to server to do language specific actions, currently not being used but there is an example in services. We will also need to make our db support multiple languages to give the corresponding data.

This PR should be reviewed and merged ASAP so that we don't introduce additional strings into the codebase and use the internationalization files instead. They are located in client under locales folder (en.json and fr.json).

Demo steps:

  1. Navigate to website
  2. Click "francais" in footer.
  3. Site should be in french, click english to go back to english.
  4. Site should be in english.