1

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 2

2

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" />
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. Can i get the css file path from Master.master.ar-sa.resx in asp.net?
0

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' />");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.