Redd-Developer / howurls.work

Learn how URLs work by visually inspecting their structure.
https://howurls.work
MIT License
100 stars 9 forks source link

Internationalization #5

Open Tazeg opened 4 years ago

Tazeg commented 4 years ago

Thanks for adding translations. I may help english/french if you set a file type format.

hehehai commented 4 years ago

@kettanaito Chinese +1 😀

kettanaito commented 4 years ago

Hey, folks. I've just merged an internationalization support to master. If you'd have a free minute, I'd appreciate if you could add a translation in one of the languages you speak.

Adding a translation

  1. Add a respective locale file to this directory: https://github.com/Redd-Developer/howurls.work/tree/1b37709eb7a8b443633c31d16d29a9587886539c/src/locales. Please use ISO language codes for file names.
  2. Provide localizations for all the keys you can find in en-US.json. When in doubt, feel free to ask here, or in the pull request.
  3. Add a new language to the <select> element in the language selector component: https://github.com/Redd-Developer/howurls.work/blob/1b37709eb7a8b443633c31d16d29a9587886539c/src/components/LanguageSwitch.js#L23-L25. Please give it the value prop equal to the name of the locale file from the previous step.

You can preview your localization locally by running:

$ yarn install
$ yarn start

Please let me know if there's any questions. Thank you!

hehehai commented 4 years ago

@kettanaito Chinese support #15