Skip to content

Add Persian (fa) locale with RTL support#3774

Open
Satan2049 wants to merge 1 commit into
chatboxai:mainfrom
Satan2049:feat/add-persian-locale
Open

Add Persian (fa) locale with RTL support#3774
Satan2049 wants to merge 1 commit into
chatboxai:mainfrom
Satan2049:feat/add-persian-locale

Conversation

@Satan2049

@Satan2049 Satan2049 commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • Add Persian (fa) as a fully supported UI language with 982 translated strings
  • Enable RTL layout for Persian using the same behavior as Arabic (sidebar, drawers, theme direction, Cairo font)
  • Register fa across locale parsing, settings schema, i18n resources, and tooling configs
  • Update README docs to list Persian in supported languages

Changes

Area What changed
Translations src/renderer/i18n/locales/fa/translation.json (new)
RTL src/renderer/i18n/rtl.ts with isRtlLanguage() for ar + fa
i18n wiring index.ts, locales.ts, parser.ts, i18next-parser.config.mjs, script/translate.mjs
Types src/shared/types.ts, src/shared/types/settings.ts
UI RTL __root.tsx, Sidebar.tsx, StyledMenu.tsx, ThreadHistoryDrawer.tsx, useAppTheme.ts
Misc accept-language.ts, openLinkWithAuth.ts
Docs README.md, doc/README-CN.md

Test plan

  • pnpm install
  • pnpm run dev
  • Open Settings → General → Language and select فارسی
  • Verify RTL: sidebar on the right, text direction right-to-left
  • Browse main screens (chat, settings, knowledge base) and confirm Persian strings render correctly
  • Switch back to English and confirm LTR restores
  • pnpm run check
  • pnpm run lint

Screenshots

Chat

Setting

Contributor Agreement

  • I have read and agree with the contributor agreement in the PR template.

Introduce fluent Persian UI translations and wire fa into the i18n stack, following the same RTL layout behavior as Arabic via a shared isRtlLanguage helper.
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1af96384-9e49-44c2-b143-fc7bc48dcdad

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Satan2049

Copy link
Copy Markdown
Author
electron_hzo2aT6R7w electron_loNf7B9aEN

@itxaiohanglover

Copy link
Copy Markdown

Nice addition! Persian locale with RTL support is important for Farsi-speaking users. Updating the i18next parser config and both READMEs is thorough.

@Satan2049

Copy link
Copy Markdown
Author

Nice addition! Persian locale with RTL support is important for Farsi-speaking users. Updating the i18next parser config and both READMEs is thorough.

Thanks bro

@Behzad9

Behzad9 commented Jul 2, 2026

Copy link
Copy Markdown

Please also change the font to a more suitable Persian font, such as Vazir. The current font, being Arabic, is not appropriate for Persian text.

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