Posted by nitrospectide on March 31, 2009 at 1:41pm
Has anyone set up a Drupal site where the admin is in English, but the front end is an RTL language? I have googled, but have not had success with the answers I found. I am assuming this isn't too difficult to do, I just can't lay my hand on the solution.
Comments
no problem
I did this for several Arabic-language sites:
- make the public theme RTL but make an LTR theme available for the Admin functions (/admin/settings/admin)
- don't translate the Drupal interface (though you may want to translate some public-facing modules)
- name your menus and write your content etc in the language of your choice
RTL
Adam,
When you say "make the public theme RTL" and the "admin theme LTR"... how do you mean? I am running Garland on both (which handles RTL), and am using the following modules:
Locale
Content Translation
Internationalization
Block Translation
String Translation
Menu Translation
I have set my RTL language as the default for the site (in the Locale admin page). This makes the front end go RTL on menus, content, everything. But the admin is RTL as well even though it is in English. This makes for some weirdness since many system generated strings apparently have their ending punctuation appended programmatically. So periods, colons and exclamation points are showing up at the beginning of lines - as well as everything being right-justified.
How do I remedy this?
From what I remember...
Hmmm... this was a couple of years ago now, and we were using v5, so the details are getting hazy. From what I remember:
We didn't use content translation (since all the content was in Arabic), and the sites didn't involve user contribution other than moderated comments - so we didn't have to ensure that everything in the site was bilingual and bidirectional. I'm sure there were also a few instances of punctuation being misplaced as you say, but as long as it wasn't publicly visible the clients weren't worried.
I can't remember whether the default language for the site was set to Arabic or English - but in either case:
- all the editors etc using the site had English set as their default language (they all spoke sufficient English that this was practical, and in fact most of them said they preferred to use English for technical work)
- we didn't import the Arabic translation for Drupal, so all the general admin functions remained in English
- we did import Arabic translations for any publicly-visible modules (weather, polls, print, etc)
- we wrote Arabic translations for any publicly-visible interfaces (comment instructions, registration emails, etc)
The themes were custom-designed, and were obviously RTL - but they were contracted out, so I'm afraid I don't know all the details of how they were done. If you look at the source of a couple of the sites below, you'll see that some divs etc are coded as align=right or dir=rtl, but there's probably more info in the CSS.
A couple of modules needed recoding - eg for Taxonomy Ticker we had to flow content in the opposite direction.
Some of the sites I worked on: www.awan.com, www.arrouiah.com, www.alquds.com
Makign the Admin LTR
You can make your admin interface LTR by targeting the body class of the website when logged in and switching to LTR in your CSS for the class atribute that relates to your logged in state.
If you are using the module Admin-menu you already get the class "admin-menu" in your body:
<body class="admin-menu">[you actually get a lot more classes than just this, but this is what we are interested in]
You can now add some CSS:
body.admin-menu {
direction:LTR;
}
Note however that you are going to want your WYSIWYG editors to still be RTL as otherwise writing a RTL language in the editor fields is going to be a nightmare.
;-)
Good luck.
Merging Technology with Creativity
Fountain City Productions
http://fountain-city.com