开发者

Is there any way for getting the direction of writing in specific culture? [duplicate]

开发者 https://www.devze.com 2022-12-26 03:56 出处:网络
This question already has an answer here: Closed 12 years ago. Possible Duplicate: Is there any way to determine text direction from CultureInfo in asp.net?
This question already has an answer here: Closed 12 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消