Possible Duplicate:
Is there any way to determine text direction from CultureInfo in asp.net?
I want to get writing direction of any culture that user select in my application. for example I want to get rtl
when my user use fa-IR
culture and get ltr
when en-US
is selected.
开发者_如何转开发Is there a built-in solution for this in .NET?
Use the TextInfo.IsRightToLeft property to determine this:
bool isRightToLeft = new CultureInfo("fa-IR").TextInfo.IsRightToLeft;
See MSDN for details.
精彩评论