fix: enforce LTR layout across the application regardless of language
This commit is contained in:
@@ -9,9 +9,9 @@ export function LanguageSwitcher() {
|
||||
const toggleLanguage = useCallback(() => {
|
||||
const newLang = i18n.language === 'en' ? 'ar' : 'en';
|
||||
i18n.changeLanguage(newLang);
|
||||
|
||||
// Update document direction for RTL support
|
||||
document.documentElement.dir = newLang === 'ar' ? 'rtl' : 'ltr';
|
||||
|
||||
// Force LTR layout regardless of language
|
||||
document.documentElement.dir = 'ltr';
|
||||
document.documentElement.lang = newLang;
|
||||
}, [i18n]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user