Forums | Mahara Community

Developers /
rtl.css


Fat Sam's profile picture
Posts: 3

21 April 2013, 1:29

I need to customize the theme to get it right to left. Can someone please let me know where to put the rtl.css file and where to refer to it?

Kristina Hoeppner's profile picture
Posts: 4863

21 April 2013, 11:37

Hello,

Normally, all stylesheets belonging to one theme live in /theme/theme-name/static/style

I am not aware of anyone having yet achieved RTL support because https://bugs.launchpad.net/mahara/+bug/1049400 is still open.

If you have any insight into RTL support in general that would be great.

http://qayrwan.com/ had its Mahara site in Arabic (it's quite customized), but I can't access it right now.

Cheers

Kristina

Fat Sam's profile picture
Posts: 3

21 April 2013, 19:39

Thank you for your response,

I managed to get a them RTL, but I don't know why it does not switch between RTL & LTR. So what I need to know is the file (eg. index.php???) where to put an IF statement to switch between 2 stylesheets.

according to lib/web.php the stylesheet rtl.css is in the folder static/style. I put it there in the theme "raw".

But when I switch between the 2 languages the direction of the layout doesnot switch with it, it keeps LTR.

Kristina Hoeppner's profile picture
Posts: 4863

28 April 2013, 15:58

Sorry, I don't know enough about CSS, RTL and programming to be of much help. Maybe a developer knows what to do.

Cheers

Kristina

Aaron Wells's profile picture
Posts: 896

30 April 2013, 15:53

Hi,

I haven't had a chance to explore the Mahara CSS & Theming system yet, but it looks like it's in the function smarty() in htdocs/lib/web.php where it decides whether or not to include the "rtl.css" file. It's around line 400. That seems to be the same one you found, though.

It looks like it's supposed to be based on the value of the "thisdirection" lang string in the langconfig.php file for the current language. If it's "rtl", then it includes style/rtl.css, and it sets a LANGDIRECTION variable that can be used in the smarty templates.

I'd first check to see what the value of $langdirection is at line 398 in lib/web.php (either doing die(var_dump($langdirection)), or using xdebug). If it's "rtl" as expected, then maybe the problem is there's some cacheing going on.

Cheers,
Aaron

5 results