Skip to content

feat(i18n): add Persian (فارسی) language support - #464

Open
ArTimnak wants to merge 1 commit into
tashfeenahmed:mainfrom
ArTimnak:feat/add-persian-language
Open

feat(i18n): add Persian (فارسی) language support#464
ArTimnak wants to merge 1 commit into
tashfeenahmed:mainfrom
ArTimnak:feat/add-persian-language

Conversation

@ArTimnak

@ArTimnak ArTimnak commented Jul 4, 2026

Copy link
Copy Markdown

Summary

Add Persian (فارسی / Farsi) language support to the dashboard UI.

This PR adds complete translation coverage for all UI sections, and registers the new locale in the i18n provider while keeping all existing functionality intact.

Changes

Just two files changed:

  1. client/src/i18n/locales/fa.json

    • New full Persian translation (nav, auth, common, models, keys, analytics, playground, embeddings, fusion, premium, languages, strategies)
    • Every translation key is matched to the existing English structure
    • Browser auto-detection works (navigator.language starting with "fa")
  2. client/src/i18n/I18nProvider.tsx

    • Added import for fa.json
    • Registered "fa" in SUPPORTED_LOCALES array
    • Added auto-detection for Persian browsers
    • Registered Persian dictionary

For reviewers

  • Locale toggling works normally (cycle includes Persian)
  • 1:1 match with English translation keys (no missing or extra keys)
  • Added at the end of SUPPORTED_LOCALES (no impact on existing behavior)
  • Translations include UI labels, buttons, placeholders, tooltips, and system messages

Testing

The PR was developed and tested locally following the project's CONTRIBUTING.md guidelines. Verified that:

  • ✅ All UI sections have proper Persian translations
  • ✅ Locale switching between English and Persian works
  • ✅ Browser auto-detection detects Persian browsers
  • ✅ No existing functionality was impacted

Repro is simply changing your browser language to Persian or using setLocale('fa') via the provider.

@ArTimnak
ArTimnak marked this pull request as draft July 4, 2026 14:05
@ArTimnak
ArTimnak force-pushed the feat/add-persian-language branch from 329e843 to 7399c0d Compare July 4, 2026 14:06
@ArTimnak
ArTimnak marked this pull request as ready for review July 4, 2026 14:07
@tashfeenahmed

Copy link
Copy Markdown
Owner

Thanks for starting this. Two blockers: (1) fa.json currently has about 437 leaf keys vs 507 in en.json, so roughly 70 strings would render untranslated; the description says 1:1 but it isn't yet. (2) Persian is RTL and the dashboard has no RTL support today, so the locale would render Persian text in LTR layouts. If you want to take it further: fill the missing keys, and we'd need at minimum dir=rtl applied when fa is active plus a pass over the main layouts. If you're up for it, let's scope the RTL piece in an issue first so the translation work doesn't sit blocked.

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.

2 participants