Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to detect an RTL language in .NET?

I need to be able to detect whether the current language my user is viewing is an RTL (Right To Left) language like Arabic, so I can include a specific CSS file in my pages.

At the moment I'm just detecting this based on the language code of the CultureInfo object, but there must be a better way?

like image 770
spmason Avatar asked Jul 16 '09 12:07

spmason


1 Answers

CultureInfo.TextInfo.IsRightToLeft
like image 181
John Saunders Avatar answered Oct 03 '22 08:10

John Saunders