From 732a7d0bbfc440d343e46c1803f627878620ea9d Mon Sep 17 00:00:00 2001 From: johnnyjoy Date: Wed, 5 Feb 2025 19:26:34 +0800 Subject: [PATCH] chore: add fa locale --- web/src/App.tsx | 2 +- web/src/i18n.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 6aac053d..27166f13 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -81,7 +81,7 @@ const App = () => { const currentLocale = commonContext.locale; i18n.changeLanguage(currentLocale); document.documentElement.setAttribute("lang", currentLocale); - if (currentLocale === "ar") { + if (["ar", "fa"].includes(currentLocale)) { document.documentElement.setAttribute("dir", "rtl"); } else { document.documentElement.setAttribute("dir", "ltr"); diff --git a/web/src/i18n.ts b/web/src/i18n.ts index c0098f8d..42b5284f 100644 --- a/web/src/i18n.ts +++ b/web/src/i18n.ts @@ -10,6 +10,7 @@ export const locales = orderBy([ "en", "en-GB", "es", + "fa", "fr", "hi", "hr",