Is there a way to get direction in a specific culture?

Possible duplicate:
Is there a way to determine the direction of text from CultureInfo in asp.net?

I want to get the post direction of any culture that the user selects in my application. for example i want to get rtl

when my user uses culture fa-IR

and gets ltr

when selected en-US

.

Is there a built-in solution for this in .NET?

+2


source to share


1 answer


Use the TextInfo.IsRightToLeft property to determine this:

bool isRightToLeft = new CultureInfo("fa-IR").TextInfo.IsRightToLeft;

      



See MSDN for details .

+2


source







All Articles