aatishb / covidtrends

Tracking the growth of COVID-19 Cases worldwide
https://aatishb.com/covidtrends/
MIT License
301 stars 106 forks source link

Different languages? #32

Open sergiogsr opened 4 years ago

sergiogsr commented 4 years ago

Is it possible to get the page translated? It's a very useful tool to explain this event in an easy to understand to people that doesn't have access to English. I could help on the translations (at least to Spanish).

Good job. Thanks for sharing.

aatishb commented 4 years ago

I would love to see translations! Thank you for suggesting this.

Currently I am imaging parallel branches of this website with the content translated, hosted on other peoples github accounts. We can create a translations page over here that links to sites with translations of this page in different languages, and then link to this translations page in the footer of the website. Or if there are fewer languages, we can just link directly in the footer.

Open to other thoughts on how to go about this.

edg2s commented 4 years ago

I would recommend using i18n files rather than maintaining parallel branches. You could use a plugin such as https://kazupon.github.io/vue-i18n/, then keep all the messages in separate files i18n/en.json, i18n/fr.json etc.

edg2s commented 4 years ago

As an open source project you would even be able to get your translations done for free by the TranslateWiki community. This is the same site that does translations for Wikipedia, OpenStreetMap and others. However this might be a bit too much effort to setup and maintain.

aatishb commented 4 years ago

Interesting! Let's look into these options. cc @mustpax

aatishb commented 4 years ago

Labeling this as a question so we can gather input on how best to implement translations (and as a note to self to look more into the options above)

CharsiBabu commented 4 years ago

I second the opinion to added lib for handling translations. Since the number of text entries would be relatively low, we could start with single js/json for all languages.

Not sure where would the language selector go. (header / footer / aside)