Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to determine text direction from CultureInfo in asp.net?

I have looked around, but I have been unable to figure this out, some languages are read and written from right to left, instead of left to right. It seems like a no-brainer to be able to get the text direction from the CultureInfo object somehow, but I have not seen it anywhere. Am I missing something?

like image 947
Chris Mullins Avatar asked Jul 14 '09 20:07

Chris Mullins


1 Answers

System.Globalization.CultureInfo.CurrentCulture.TextInfo.IsRightToLeft

This will return true if the current culture is read from right to left.

like image 152
John Saunders Avatar answered Nov 02 '22 20:11

John Saunders