BI-DI: Joomla RTL Support

Locked
kash
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Nov 18, 2005 8:57 pm

BI-DI: Joomla RTL Support

Post by kash » Wed Dec 24, 2008 6:53 am

Search in Google for Joomla RTL:
Results 1 - 10 of about 497,000 for joomla RTL. (0.05 seconds)
"Arabic, Persian and Hebrew scripts, are written in a form known as right-to-left (RTL), in which writing begins at the right-hand side of a page and concludes at the left-hand side. This is different from the left-to-right (LTR) direction used by most languages in the world." wikipedia
1. Introduction
1.1 Scope
The scope of this document is to describe a change to the direction of Joomla Template including:
1.1.1 Menu Direction
1.1.2 Modules and components Direction.
1.1.3 Text Direction


1.2 Objective of the document
The objective of this document is to initiate the functionality of RTL in Joomla as basis for a discussion on a change in Joomla Bi-Di support.

1.3 General remarks
Many Languages require RTL Support esp. (Arabic, Hebrew and Parisian).

1.4 Definitions

1.5 License
GNU GPL

2. What is the current issue?
Manual work done to the templates css files return in a defected website most of the time that reflect bad on joomla image and waste the community time to a tedious and repeating coding that could be utilized in building better content. The newly suggest functionality will help converting the template direction by a system parameter for Direction.

3. What are the proposed improvements?
Add a System parameter in the Admin Area to select the direction of the website LRT(Default) or RTL (Right to Left) to effect the following:

3.1 Site Direction
template's index.php file:
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">

3.2 Menu Direction
first menu to be on right and dropdown lists to be right direction

3.3 Modules and components Direction
positions of modules to be switched automatic wit RTL selection

3.4 Text Direction
text-align: right

4. Technical realisation

5. Intention
This allows for a real multilanguage support that has been requested since long time by many communities esp. Arabic, Hebrew and Parisian.

6. Effects on...

6.1 Users
reflects a better image of joomla implementation for RTL Websites and Save the time and effort to convert the templates to RTL.

6.2 3rd Party extensions
There should be no effects on third party extensions.

6.3 Performance
There should be no effects on the performance.
Khalid Al Holan :: Arabic Joomla Support
http://www.opensource.com.sa

eyashwant
I've been banned!
Posts: 960
Joined: Wed Dec 03, 2008 9:28 am
Contact:

Re: BI-DI: Joomla RTL Support

Post by eyashwant » Wed Jan 28, 2009 10:41 am

Add a System parameter in the Admin Area to select the direction of the website LRT(Default) or RTL (Right to Left) to effect the following:
Please tell how to do it in detail.
Site Direction
template's index.php file:
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
Done this successfully.
3.2 Menu Direction
first menu to be on right and dropdown lists to be right direction

3.3 Modules and components Direction
positions of modules to be switched automatic wit RTL selection
Please explain how to do these both things. Cannot understand.
3.4 Text Direction
text-align: right
Done

Is there any thing else I have to do.

User avatar
alavi nik
Joomla! Explorer
Joomla! Explorer
Posts: 344
Joined: Wed Sep 20, 2006 7:48 pm
Location: Tehran,Iran
Contact:

Re: BI-DI: Joomla RTL Support

Post by alavi nik » Fri Mar 27, 2009 3:32 pm

this is ok.very nice ;-) Thanks
Joomfa Team(Joomla farsi) ==> http://joomfa.org

User avatar
JoomArt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Thu Jul 02, 2009 7:18 am
Contact:

Re: BI-DI: Joomla RTL Support

Post by JoomArt » Thu Jul 02, 2009 2:02 pm

Strongly Appreciated...
http://www.JoomlArt.ir - RTL Joomla Templates

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18728
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: BI-DI: Joomla RTL Support

Post by infograf768 » Sat Jul 04, 2009 3:27 pm

Hmm...

Joomla uses already the rtl parameter from the language xml

Then it 's simply a matter of using/writing a template_rtl.css and load it through the index.php of the template with a conditional statement.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

rabah
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Aug 06, 2009 7:11 am

Re: BI-DI: Joomla RTL Support

Post by rabah » Thu Aug 06, 2009 7:27 am

I agree, Joomla already uses the LTR or RTL with the xml, but you can always add the language's xml support and that should help as well. I also think its better to use or make differntiation via the css file, like css-file-rtl.css but whats the best way to use that in the index.php with if statements? I have the index like this: /index.php?lang=ar or /index.php?lang=en how could i tell the system that if /index.php?lang=ar use a new css file?

i have currently support for arabic and english but the menu is ltr and i need the arabic part to be rtl. I am using joomfish and it works great except for the menu part. any ideas? thanks

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18728
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: BI-DI: Joomla RTL Support

Post by infograf768 » Thu Aug 06, 2009 9:02 am

If you have various templates depending on different RTL languages, then you may need to use the $lang parameter.
If only one template, then the conditional statement is fine.
<?php if($this->direction == 'rtl') : ?>
<link href="<?php echo $this->baseurl ?>/templates/my_template/css/template_rtl.css" rel="stylesheet" type="text/css" />
<?php endif; ?>


Although this pdf is in French, you will find towards the end some code for various language conditionals.
http://joomladay.fr/index.php?option=co ... oad&cid=23
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

rabah
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Aug 06, 2009 7:11 am

Re: BI-DI: Joomla RTL Support

Post by rabah » Fri Aug 07, 2009 10:29 am

Thank you for your help - I will give it a try ...

Have a good day!


Locked

Return to “Feature Requests - White Papers - Archived”