Joomfish +Language Direction modes

More
12 years 11 months ago #21444 by nazanintb
Hello :
I'm using Joomfish on my architecture template for two translations. one of my languages are RTL , the other is LTR. so the question is how the template can automatically change to the right direction mode ? I hope what I said is clear to understand.

many thanks

Please Log in to join the conversation.

More
12 years 11 months ago #21448 by ivan.milic
If you load language set as RTL joomla loads rtl css template file. So layout is more global thing.

Please Log in to join the conversation.

More
12 years 11 months ago #21449 by nazanintb
I am sorry, but I didnt quite understand, did u mean i should set the css to layout ? if yes , how can I do this , as the default language is RTL ?

Please Log in to join the conversation.

More
12 years 11 months ago #21457 by ivan.milic
I'am sorry, you want automatic change. Open index.php of template, and after this line (around 63):

$textDirection = $this->params->get("textDirection", "ltr");

add this:
if($this->language == 'en-gb'){
$textDirection = 'ltr';
}else if($this->language == 'xx-xx'){
$textDirection = 'rtl';
}

where instead of xx-xx you should write short-code in lower case fore that language.
The following user(s) said Thank You: nazanintb

Please Log in to join the conversation.

More
12 years 11 months ago #21468 by nazanintb
Thank you very much , it is working . is there any way to do the same for the menus as well ? so the menu tab that is on the left for RTL goes to right for RTL ?

Please Log in to join the conversation.

More
12 years 11 months ago #21474 by ivan.milic
You can create module and menu item for specific language. See in left part settings. You can select "All" and also all languages you use are listed.

Please Log in to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum