scorelab / fact-bounty

fact-Bounty - Fact Bounty is a crowd sourced fact checking platform.
http://www.fact-bounty.org/
Apache License 2.0
44 stars 95 forks source link

No support for upgrading platform to new languages #530

Open Aayush-1999 opened 4 years ago

Aayush-1999 commented 4 years ago

Expected Behavior

The platform should be able to display data in multiple languages based on user's geographical location. This can be done by including Internationalization bundles from where the text on all the pages should be coming from.

Current Behavior

There is no support for multiple languages. All the text is in English.

Anmolbansal1 commented 4 years ago

@Aayush-1999 I think it is a beneficial feature, but can you share your workflow and changes you are planning to achieve this. Then you may start to work on it 😃

Aayush-1999 commented 4 years ago

I will use react-i18next for implementing this feature. A folder name locales needs to be created inside the public directory which contains json files ,one for each language, For e.g. en (English), chi(Chinese). These json files will contain all the static data of the app in different languages but referenced to same object name.

Then every component or page needs to be updated to use the data from these json files by replacing the data value by their object name specified in json file. A javascript function to capture user's language from their browser will also be used.