Find the flow direction from CurrentCulture in C #

HI Is there a way to get FlowDirection for the current culture.

I set a property like

public string FlowDirection { get { return // should return the flow direction using Thread.CurrentThread.CurrentUICulture. } } 

I do not want hardcode something like

 if (currentLanguage.ToLower().StartsWith("ar")) { return FlowDirection.RightToLeft; } else { return FlowDirection.LeftToRight; } 
+4
source share
1 answer

use this: CultureInfo.TextInfo.IsRightToLeft

taken from a related question

+7
source

Source: https://habr.com/ru/post/1336918/


All Articles