Add Farsi (Persian) translation

Add complete fa locale with 1146 translated keys (266 common, 880 tools).

Register 'fa' in supportedLanguages, languageNames, and SUPPORTED_LANGUAGES.
Also add 'fa' to the three hardcoded language regexes in i18n.ts
(getLanguageFromUrl, changeLanguage, rewriteLinks) — these are not mentioned
in TRANSLATION.md, but without them /fa/ silently falls back to English.
Persian is RTL, so extend the dir=rtl check from 'ar' to ['ar','fa'] in both
i18n.ts and generate-i18n-pages.mjs.
This commit is contained in:
Kouros Zanbouri committed 2026-07-31 12:51:54 +01:00
1 parent 5a4be8e7f2
commit e5901f662f
5 files changed
+1551 -5

No files matched your search

+1 -1
View File
@@ -183,7 +183,7 @@ function processFileForLanguage(
const document = dom.window.document;
document.documentElement.lang = lang;
document.documentElement.dir = lang === 'ar' ? 'rtl' : 'ltr';
document.documentElement.dir = ['ar', 'fa'].includes(lang) ? 'rtl' : 'ltr';
let title = null;
let description = null;