I would like to see the way that modx could handle both LTR and RTL(Right to Left) languages easily without duplicating the css files, by the way ive got something to share, and sorry that it comes with no real sensible example, but i’m sure if you follow the note you’ll get some idea about what i mean... this is about
languages Particular attribute selector and the way it handles the elements in css files... i’ll be greatfull if anyone used this method before and wants to share some idea about, and to use it in installer at first and then applying the same rule to the manager interface.
Ex: This rule will select any element whose "lang" attribute is equal to "en" or begins with en- or we can use it as our default RTL/LTR display method, any attribute could be placed like LTR or RTL !...
*[lang|="en"] {color: white;} or *[lang|="rtl] {direction: rtl;} and *[lang|="ltr"] {direction: ltr;}
example of how any attribute could be affected by this method:
<h1 lang="en">Hello!</h1>
<p lang="en-us">Greetings!</p>
<div lang="en-au">G’day!</div>
<p lang="fr">Bonjour!</p>
<h4 lang="cy-en">Jrooana!</h4>
In general, the form
[att|="val"] can be used for any attribute and its values.
For situations where we wanto select an element based on its language, we can use
:lang( ) pseudo-class. in terms of its matching patterns, the
:lang ( ) pseudo-class is exactly like the
| = attribute selector.
For example, to RTLize any element in the persian language, we would write:
*:lang(fa) {font-family: Tahoma; direction: rtl;}
(I think this can be used in some other language like chinese to show the best fit display result).
Somehow the pseudo-class is a bit more robust than the attribute selector and is probably a better choice in most cases where language-specific styling is needed.
I can explain more about the difference and the limits caused in particular situations in some browsers and about the use of META element or by information from http protocol (at headers, XML:lang) all could be used in combination for language-specific methods for determinig the language or the way it should display the content.
Thanks for your time