Reputation: 203
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?
Upvotes: 1
Views: 155
Reputation: 812
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' />");
Upvotes: 0
Reputation: 5092
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" />
}
Upvotes: 2