Skip to content

feat: Add Hindi locale support #176

Description

@O2sa

Hindi is spoken by over 600 million people worldwide and is one of the most widely spoken languages globally. It is the official language of India and widely used across South Asia. Adding Hindi locale support will make the application accessible to a massive community of Hindi-speaking developers.

Overview

Hindi will be added as a new supported locale with the language code hi. Hindi is written using the Devanagari script from left-to-right (LTR), making this a straightforward addition similar to French, Spanish, Mandarin Chinese, and Indonesian.

Tasks

  • Create a new locale file locales/hi.json with all translation keys from locales/en.json translated to Hindi.
  • Update lib/i18n-core.ts to add hi to the supportedLocales array.
  • Add Hindi entry to the localeMeta object in lib/i18n-core.ts with the following configuration:
    hi: { dir: "ltr", label: "हिंदी" }
  • Test the language switcher to ensure Hindi appears in the dropdown menu.
  • Test the application with Hindi locale selected to ensure all UI elements display correctly.
  • Verify that all text content renders properly without layout issues.
  • Ensure proper character encoding (UTF-8) is maintained for Devanagari script throughout the application.
  • Update CONTRIBUTING.md with instructions for translating content to Hindi (if not already documented in the localization guide).

Translation Keys

All translation keys from the existing English locale must be translated to Hindi. The keys include:

  • Application titles and subtitles
  • Error messages
  • UI labels and buttons
  • Explanations and descriptions
  • Comparison metrics
  • Community contribution labels
  • And more (reference locales/en.json for the complete list)

Testing

  • Language switcher displays "हिंदी" correctly.
  • All pages render without errors when Hindi is selected.
  • No layout shifts or broken styling in LTR mode.
  • All Devanagari characters display correctly without encoding issues.
  • All Hindi translations are grammatically correct and contextually appropriate.

Tip

🚀 Want to contribute?
Comment assign me to be automatically assigned to this issue via our GitHub Actions bot. Happy coding! ✨

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions