I have asp.net web application for english ltr direction. Now i need to make it also available in arabic rtl direction. I'm having LTRStyle.css and RTLStyle.css for english and arabic. If change the language how to call the RTLStyle.css file?
2 Answers
The logic on how you can do it is just like this:
if(language == english){
<link href="LTRStyle.css" />
}
if(language == arabic){
<link href="RTLStyle.css" />
}
1 Comment
Mohammed
Thank you. Can i get the css file path from Master.master.ar-sa.resx in asp.net?
In your page or masterpage code behind check if Thread.CurrentThread.CurrentUICulture is 'ar' or whatever the way you are using to check the changing of the language then register a ClientScript
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "siteCSSLink", "<link href='RTLStyle.css' rel='stylesheet' />");