Skip to content

feat(i18n): add complete Persian locale and RTL coverage - #10583

Merged
DanielnetoDotCom merged 1 commit into
WWBN:masterfrom
MiRHaDi:feat/persian-locale-rtl
Sep 8, 2026
Merged

DanielnetoDotCom merged 1 commit into
WWBN:masterfrom
MiRHaDi:feat/persian-locale-rtl

Conversation

@MiRHaDi

@MiRHaDi MiRHaDi commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Add complete Persian (fa_IR) localization and RTL coverage

Summary

This pull request adds a complete, production-oriented Persian localization for AVideo and makes the project documentation accessible to Persian-speaking operators and contributors.

It includes:

  • a full fa_IR catalog with all 1,638 keys from en_US in the same order;
  • no empty translations and no missing or extra keys;
  • preservation of runtime placeholders, HTML, URLs, entities, and template tokens;
  • registration of Persian (Iran) in the existing BCP 47 language catalog;
  • explicit RTL verification for both fa_IR and fa-IR;
  • a complete Persian translation of the root README;
  • automated regression tests for catalog parity, token safety, terminology, registration, and RTL behavior.

Why this matters

Persian is written right-to-left and is used by a large community of creators, educators, media teams, and self-hosting operators. A locale is only useful when it is complete, context-aware, safe for runtime interpolation, and correctly connected to the application's directionality system. This change covers those requirements together instead of shipping a partial word-for-word translation.

Translation quality

The catalog was reviewed as product copy, not as an isolated glossary. Terminology is consistent across the UI, including:

English Persian
Upload بارگذاری
Download دریافت
Live پخش زنده
Encoder رمزگذار
Plugin افزونه
Dashboard پیشخوان
User Groups گروه‌های کاربری
Sign Up ثبت‌نام

Technical names and standards such as API, CDN, EPG, URL, VAST, WWBN, Netflix, and YouTube Data API remain unchanged where translation would reduce clarity or break product terminology.

Files changed

  • locale/fa_IR.php — complete Persian catalog
  • tests/Unit/PersianLocaleTest.php — localization contract tests
  • README.fa.md — complete Persian project documentation
  • README.md — language switcher link to the Persian README

Verification

  • PHP syntax check: passed
  • English/Persian key count: 1,638 / 1,638
  • Key order parity: passed
  • Empty values: 0
  • Protected-token mismatches: 0
  • Locale registration: passed
  • RTL checks for fa_IR and fa-IR: passed
  • PHPUnit: 5 tests, 3,290 assertions — passed
  • Full PHPUnit suite: 512 tests, 4,343 assertions — passed
  • Markdown headings, links, URLs, HTML tag sequence, and code fences: passed
  • git diff --check: passed

Compatibility and risk

The change is additive. It does not alter existing locale keys, application routes, database schemas, or runtime behavior for other languages. The regression test compares Persian against the current English catalog, so future source-string drift is visible immediately.

Reviewer notes

Persian reviewers are especially welcome to comment on tone and domain terminology. The automated tests intentionally protect runtime syntax while leaving wording open to human refinement.

@DanielnetoDotCom
DanielnetoDotCom merged commit 33dd8e3 into WWBN:master Sep 8, 2026
11 of 12 checks passed
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