Page 1 of 1

dynamic CSS selection based on current language

Posted: Wed Sep 11, 2013 3:00 pm
by mansour

hi,
I have a multilingual project (Persian --> RTL and english --> LTR)!
I set the page direction dynamically using a new language variable! (page direction works fine using this trick)!
Because of different direction i need to set CSS parameters dynamically! how may i do that?
do you have any idea?
may i produce 2 css file during page generation? if yes, how?

Please advise!
Regards


Re: dynamic CSS selection based on current language

Posted: Wed Sep 11, 2013 6:02 pm
by mobhar

You can create the RTL css version and then incorporate it into your template file.

To include it in the header, you can use "Page_Head" server event. Read "Server Events and Client Script" for further information and example.