Skip to content

i18n: Add Hebrew (he) language support with RTL handling #39436

Description

@toyro396133

Summary

Add comprehensive Hebrew (he) locale support across all OpenCode packages with full RTL (right-to-left) handling.

Background

Hebrew is spoken by over 9 million people worldwide and is a critical language for Israeli developers and users. OpenCode currently supports many languages but lacks Hebrew support, which requires RTL (right-to-left) text direction handling in addition to translation.

Proposed Changes

This request is being implemented in PR #39423 which includes:

Core Implementation

  • Add Hebrew to locale arrays in all relevant configuration files
  • Create Hebrew translation files for all packages (app, ui, desktop, console, stats, web)
  • Implement RTL support with dir="rtl" on the html element for Hebrew locale
  • Add Hebrew-specific plural form handling (one, two, other)
  • Create Hebrew glossary file with RTL guidance and translation standards

Translation Coverage

  • 434 critical strings manually translated from English to Hebrew
  • 74 technical strings kept in English (key names, brand names, placeholders, URLs) following professional localization standards
  • 41 missing keys added to stats package with proper Hebrew translations
  • 7 critical documentation files translated to Hebrew:
    • index.mdx (getting started guide)
    • cli.mdx (CLI documentation)
    • config.mdx (configuration guide)
    • commands.mdx (custom commands)
    • providers.mdx (LLM providers guide)
    • troubleshooting.mdx (common issues)
    • zen.mdx (OpenCode Zen service)

Quality Assurance

  • Fixed all syntax errors in Hebrew translation files (escaped quotes, newlines)
  • Corrected partial translations and mixed Hebrew/English strings
  • Fixed corrupted brand names (e.g., "פתחCode" → "OpenCode")
  • Fixed workspace/session management strings with mixed content
  • Ensured consistency with existing translation patterns in the codebase
  • All changes rebased onto latest upstream/dev branch for compatibility

Requirements

  • Follow existing i18n patterns in the codebase (e.g., Arabic locale for RTL reference)
  • Maintain consistency with existing translation file structures
  • Ensure proper RTL CSS support for Hebrew layout
  • Test Hebrew interface with common use cases
  • Verify translations match technical context accurately

Impact

  • User Impact: Hebrew-speaking users will have native language support with proper RTL layout
  • Technical Impact: Adds one locale to i18n system with RTL handling
  • Maintenance: Follows existing patterns, minimal ongoing maintenance required
  • Breaking Changes: None - this is additive functionality

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions