1

Example: if I use arabic language the text field direction will be rtl and if I want to write a new text and I switch to the English language the direction inside the text field (`text-align: left) will be ltr automatically

i have two language in my site.

one is English, and the second is Arabic.

So, when i click in Arabic languse site, i need to change direction of theme from LTR to Rtl, and when click English languge, i need to change direction to LTR.

my site :-

http://p1.b7d.com/magento/meghzal/index.php/

thank.

kamgfx
  • 21
  • 1
  • 2
  • 7

1 Answers1

2

here would like to suggest to make individual css for your Arabic store to change Direction Add below add into you new style.css

direction:rtl

to your input in new css

Also you can use by javascript

How to Change CSS direction property of the input field automaticly if the user can use an language rtl or ltr

Edit

Add CSS from layout.xml or local.xml

<default>
  <reference name="head">   
     <action method="addItem"><type>skin_css</type><name>css/arstyles.css</name>/action>
  </reference>
</default>

hope this will sure help you.

Community
  • 1
  • 1
liyakat
  • 11,825
  • 2
  • 40
  • 46
  • ok but how can i define the direction and make for it the own style – kamgfx Sep 27 '13 at 08:22
  • you have to create own style.css and assign thie style folder to your store by admin configuration, you can change from `system-> configuration-> design -> skin` folder to create folder for store and put your style.css in it – liyakat Sep 27 '13 at 09:23
  • yes i am talking about custom store. select your store from left drop down in sytem configuration.it would be glad for me if u will acpt my answer – liyakat Sep 27 '13 at 10:30
  • yourmagento\skin\frontend\default\yourskin\css\style.css name should be same style.css because it will effect automatically from xml.pls dont change name from `style.css` to `style_ar.css` – liyakat Sep 27 '13 at 11:07
  • iam go to `system-> configuration-> design -> skin (Images / CSS)` and write `http://p1.b7d.com/magento/meghzal/skin/frontend/breeze/default/css/arstyles.css` on it but not work why ??? – kamgfx Sep 27 '13 at 12:27
  • pls add `breeze` in your package and add css to style.css – liyakat Sep 27 '13 at 12:47
  • i add in `Current Package Name` this `breeze` – kamgfx Sep 27 '13 at 12:58
  • so what can i do for add arstyle.css for arabic store – kamgfx Sep 27 '13 at 13:05
  • if you want to add arstyle.css to only your arabic store. create you own skin folder add all default css and images in skin's relavent folder and use my updated code to include css from local.xml or layour.xml of your store only – liyakat Sep 28 '13 at 03:50
  • @kamgfx,glad to help you. – liyakat Sep 28 '13 at 07:06