CustomCodeEditor icon indicating copy to clipboard operation
CustomCodeEditor copied to clipboard

Add UI translations (i18n) starting with Hindi, Tamil and Spanish

Open DhanushNehru opened this issue 1 month ago • 3 comments

Summary

The editor UI is English only. Many learners code more comfortably with an interface in their own language.

Proposed approach

  • Add a light i18n layer (for example react-i18next or a small custom hook) with JSON files under src/locales/.
  • Move visible strings from EditorComponent, the footer and the sign-in buttons into translation keys.
  • Add a language switcher that saves the choice in localStorage and defaults to the browser language.
  • Ship English plus at least one more locale in the first PR. Others can follow as separate PRs.

Acceptance criteria

  • English output is identical to today.
  • Missing keys fall back to English.
  • A short "How to add a language" section is added to CONTRIBUTING.md.

Notes

Translations by native or fluent speakers are most useful. Please say which locale you will add so work is not duplicated.

DhanushNehru avatar Nov 03 '26 14:11 DhanushNehru

Thank you for raising this issue! Our team will review it soon.

For more queries or discussions or approval of requests, please join the Discord server for further discussion: https://discord.com/invite/Yn9g6KuWyA

github-actions[bot] avatar Nov 03 '26 14:11 github-actions[bot]

Hi @DhanushNehru, I'd like to take this one, with Hindi, Tamil and Spanish as the first three locales.

I ran a scan on the repo: 46 visible strings, mostly in EditorComponent.js (29) plus the footer, the sign-in buttons, the star prompt and the two selects. The editor theme names in constants.js would stay as they are, since they're names.

The PR would follow your proposal:

  • react-i18next with JSON files in src/locales/ (en, hi, ta, es)
  • those 46 strings moved to keys, with English output unchanged
  • a language switcher that saves the choice in localStorage and defaults to the browser language
  • missing keys fall back to English
  • a "How to add a language" section in CONTRIBUTING.md

About the translations: I'm building localize.dev, and the first drafts would come from it, not from a native speaker. I'd mark them as drafts in the PR so Hindi and Tamil speakers in your Discord can review them before merge, or I can ship English plus Spanish first and leave Hindi and Tamil for fluent contributors, as your notes suggest. I can also add its GitHub Action so new strings get draft translations in a PR you review, but that's optional and can wait.

Which do you prefer? I'll post in the Discord too, since that's where requests get approved.

ufortstephen avatar Nov 10 '26 17:11 ufortstephen

Thanks for the detailed plan. Go ahead with the i18n layer and English + Spanish in the first PR. Please mark the Spanish translations as drafts for fluent review before merge. Hindi and Tamil can follow separately. Let's skip the GitHub Action for now and keep this PR focused on the i18n layer.

DhanushNehru avatar Nov 11 '26 06:11 DhanushNehru