Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Switch between Stylesheets according to language

Switch between Stylesheets according to language

Locked

Views: 945

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
18 Mar 2010, 6:48 PM
#1
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

Switch between Stylesheets according to language

Hi,

I'm developing a new template and it's using both hebrew and english so that changes everything. When hebrew is selected HTML gets RTL and everything switches to right-to-left. While in english it's the opposite (LTR). Thing is, there are things in CSS like float:right that needs changing to float:left when english is the selected language. So, to solve this out I think the best way would be assigning a different stylesheet, one for each language. This way, I can easily modify the stylesheet to work perfectly for LTR/RTL. The other way around is modifying lots of templates and use the extra definitions to allow change of CLASS names. Long story short, its a really bad, time consuming solution.

So, how can I work this out?

:unsure:

PS,
I already have an idea but it's not the best. Maybe upload two versions of my template and make one in english and the other in hebrew, that might work out but it'll be a pain in the ###### to update both template each time.

18 Mar 2010, 8:35 PM
#3
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

Re: Switch between Stylesheets according to language

Oh this is great! Thanks a lot DrByte! :D

18 Mar 2010, 9:00 PM
#4
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

Re: Switch between Stylesheets according to language

It works brilliantly!