Is there any way to detect an RTL language in .NET?
-
16-09-2019 - |
Question
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?
Solution
CultureInfo.TextInfo.IsRightToLeft
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow