modify props of "html" and "body" further
Unanswered
Sage Thrasher posted this in #help-forum
Sage ThrasherOP
export function LanguageProvider() {
const { data: session } = useSession();
const language = 'ar';
useEffect(() => {
i18n.changeLanguage(language);
}, [language]);
const isRtl = isRightToLeft(language);
return (
<html dir={isRtl ? 'rtl' : 'ltr'} />
);
}i want to modify this "dir" property of the html tag however this LanguageProvider is inside the body. How can I change this without using js (document....dir = "rtl")