I see that I can apply attribute direction: rtl to force right to left alignment:
It also mentions that HTML5 supports direction: auto, based on the users language. As I only know english, I can set the browser to force RTL layout with within the chrome config:
However the layout of the page I’m working on is unchanged unless I edit the css for the top level element to have the property: direction rtl. Am I correct in assuming that if you define:
That your page will automatically use rtl or ltr element alignment based on the users selected language? If so, why isn’t it working from my test above?
If not, how can I selectively include direction: rtl ONLY if the users language is an rtl language?
Once the language and type is detected, I would add a class to your body element, that your css listens for to change the ltr or rtl.
Answered By – Nieminen
Answer Checked By – Jay B. (AngularFixing Admin)