mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-11 01:14:35 +01:00
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:
5 files changed
+1551
-5
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user