Themes and RTL languages
During the last week I tried to rethink the actual right to left system, namely BiDi.
How it work:
If an rtl language is detected, the styles sheet "styles/BiDi/BiDi.css" is applied.
How it fails:
The system work fine but it is definitely mono theme.
To work with several theme is a pain and therefor we have a problem. From being able to display Tiki Community multiple websites to offering a smooth transition from the default installed theme (new install set theme to fivealive, option blueberry) to the admin selected theme.
The idea to improve
My idea is actually to keep BiDi.css optimized and small as possible to make it display properly Tiki Install default theme while in each folder theme we would add an "rtl" folder to hold graphics (some of them need to be reversed) and a second layer of CSS properties for the selected theme in a .css file ; mytheme_BiDi.css.
Where I'm:
Default (fivealive blueberry);
I have optimized BiDi.css and add an rtl folder into fivealive folder containing an rtl version of the header.
Note : no need for this theme for a specific css file as per default BiDi is set to work with fivealive. (but i wrote a example - commented)
Experimental theme GreenValley
In the theme GreenValley that is working in ltr and rtl i added an rtl folder that include graphics and greenvalley_BiDi.css to apply this theme rtl specific properties.
Note : In the file /styles/BiDi/BiDi.css i have set an properties to read greenvalley_BiDi.css.
@import url("../greenvalley/rtl/greenvalley_BiDi.css");
Conclusion:
We have a descent default install theme working in rtl.
This work fine only manually (for each theme you style have to change the "@import url(".
Next:
I would like to have a way to automatically select the specific rtl stylesheet. A way to compose automatically in BiDi.css the path for the theme specifi BiDI file to be read using @import url.
For example if i select theme "one" it should read
@import url("../one/rtl/one_BiDi.css");
If i select theme "two" it should read
@import url("../two/rtl/two_BiDi.css");
And so on...
Feedback and help would be appreciated.
Bernard
PS : some of my work is still undergoing but my post reflect what should be online in the coming hours.