Skip to content

feat(dashboard): add Hebrew (he) translations and RTL support#64

Merged
rmyndharis merged 1 commit into
rmyndharis:mainfrom
yosef-chai:feat/i18n-hebrew-rtl
May 17, 2026
Merged

feat(dashboard): add Hebrew (he) translations and RTL support#64
rmyndharis merged 1 commit into
rmyndharis:mainfrom
yosef-chai:feat/i18n-hebrew-rtl

Conversation

@yosef-chai
Copy link
Copy Markdown

@yosef-chai yosef-chai commented May 17, 2026

Summary

Adds full internationalization (i18n) to the dashboard with English and Hebrew locales, including right-to-left (RTL) layout support and an in-app language switcher.

What's included

  • i18next stack: i18next, react-i18next, and i18next-browser-languagedetector
  • New module: dashboard/src/i18n/ with index.ts config and locales/{en,he}.json covering every page, modal, toast, table column, button, and empty-state message
  • Language switcher: globe icon in the sidebar footer; selection persists to localStorage (openwa_language); on first load the browser language is auto-detected
  • RTL support: document.documentElement.dir / .lang are kept in sync with the active language. Scoped [dir=\"rtl\"] CSS overrides handle:
    • Sidebar border, collapse arrow, main content margin
    • Modal footer ordering (flex-direction: row-reverse)
    • Select caret position
    • Input text alignment
    • URL/email/tel inputs forced LTR
    • Toast slide-in side
    • code, .mono, pre stay LTR even inside RTL containers (so phone numbers, session IDs, and JSON render correctly)
  • Typography: Heebo font loaded via Google Fonts for Hebrew, falling back to system Hebrew fonts
  • All 9 pages converted: Login, Dashboard, Sessions, Webhooks, ApiKeys, MessageTester, Infrastructure, Plugins, Logs
  • Translation register: professional/technical Hebrew (ktiv maleh, gender-neutral phrasing). Technical identifiers (Session, Webhook, API, QR, S3, Redis, PostgreSQL, MinIO, BullMQ, etc.) intentionally kept in English to match developer expectations and avoid awkward calques

What's not changed

  • No backend changes
  • No API changes
  • No database migrations
  • No Docker / deployment changes
  • English remains the default — existing users see no behavior change unless their browser is set to `he-*`

Test plan

  • `tsc -b` passes with no errors
  • `npm run build` (vite) succeeds with no warnings
  • Hebrew strings present in production JS bundle (verified: דאשבורד, Sessions פעילים, התחברות, ניהול Sessions, הגדרות שרת, מפתחות API, בדיקת הודעות, תוספים, לוגים)
  • [dir=rtl] CSS rules present in compiled CSS bundle
  • Heebo @import present in compiled CSS
  • Dashboard loads and renders in EN (default)
  • Language switcher toggles to HE, document direction flips to RTL, sidebar and modals reflow correctly
  • Refreshing the page preserves the chosen language
  • All forms (Sessions create, Webhooks create/edit, API Key create, MessageTester) accept input correctly in both directions
  • Reviewer: please verify Hebrew copy matches your preferred terminology - happy to iterate on phrasing
  • Reviewer: consider whether i18next-browser-languagedetector first-load auto-detect is desired, or if EN-by-default-until-toggled is preferred

Bundle size impact

Roughly +35 KB gzip from i18next + the two locale JSON files. Locales are bundled together (no async loading) to keep things simple; happy to switch to lazy-loaded namespaces if preferred.

Add full internationalization (i18n) to the dashboard with English and
Hebrew locales, including right-to-left layout support and an in-app
language switcher.

What's included:
- i18next + react-i18next + browser language detector
- New src/i18n/ module with en.json and he.json translation files
  covering all pages, components, and toast messages
- Language switcher button in the sidebar footer (persists to
  localStorage; auto-detects browser language on first load)
- RTL support: document dir/lang is updated on language change,
  with CSS overrides for sidebar, modals, inputs, selects, toasts,
  and code blocks (technical identifiers stay LTR even in RTL)
- Heebo web font loaded for Hebrew typography
- All 9 pages converted: Dashboard, Sessions, Webhooks, ApiKeys,
  MessageTester, Infrastructure, Plugins, Logs, Login

Backwards compatible: English remains the default, no API or backend
changes, no schema migrations. Existing users see no behavior change
unless their browser is set to he-*.

Verified:
- tsc -b passes with no errors
- vite build succeeds
- All Hebrew strings present in production bundle
- RTL CSS rules present in compiled output
@rmyndharis rmyndharis merged commit 697b4a1 into rmyndharis:main May 17, 2026
@yosef-chai yosef-chai deleted the feat/i18n-hebrew-rtl branch May 17, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants