I need to create a website in Arabic, Right to Left language. Can you please guide me on what to do to flip the layout to "right to left" with this beautiful theme.
Thanks

CommentFileSizeAuthor
#3 Right to Left text.327.93 KBpwhiteside
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwhiteside’s picture

Hi there,

I have never done it myself but I think most of it can be done with CSS. I have tried this just now using Dragonfly with little change but once you have your text in and the declaration in the actual style then it should work, I think :D Also I tested on the demo which frames the theme making live editing difficult.

Try adding this declaration to your CSS sheet, /sites/all(or default)/themes/journalcrunch/style.css at the very bottom so it overrides all other CSS.

*{direction:rtl !important;} /* Make text Right to Left */

The "*" means everything, it's a wildcard so should apply to all. The "!important" may not be needed but will force the rule to override in-line style.

I have never used the code myself but I got it from here, http://www.w3schools.com/cssref/pr_text_direction.asp If you are interested in learning html, css, php etc then that site is a great place to start, it's where I taught myself, and it will help you to build and adapt much more custom themes.

I hope this helps you, let me know how it goes,

Best wishes, Phil the Whiteside of life.

postscripter’s picture

Hi,
I tried adding the CSS line. But no changes. Nothing flipped to "right to left"
Thanks

pwhiteside’s picture

FileSize
327.93 KB

Hi there,

I have a solution working on my dev server, see the attached image for the intended result.

You need to add dir="rtl" to the highest piont you can in the html, http://www.w3.org/International/tutorials/bidi-xhtml/
The page.tpl.php worked for me, to do this edit /sites/all/themes/journalcrunch/page.tpl.php

Change line 1 from

<div id="mainWrapper">

to

<div dir="rtl" id="mainWrapper">

Flush all caches, that's it.

Best Wishes, Phil.

pwhiteside’s picture

Status: Active » Closed (fixed)

Hi,

Because I have had this working on my server as shown in the screenshot in #3 I am marking this as closed (fixed).

Best Wishes, Phil.