Find the flow direction from CurrentCulture in c#
HI Is there any way to get the FlowDirection for current culture.
I have set a property like
public string FlowDirection
{
get {
return // should return the flow direction using Thread.CurrentThread.CurrentUICulture.
}
}
I dont want to hardcode something like
if (currentLanguage.ToLower().StartsWith("ar"))
{
开发者_如何学C return FlowDirection.RightToLeft;
}
else
{
return FlowDirection.LeftToRight;
}
use this: CultureInfo.TextInfo.IsRightToLeft
taken from related question
精彩评论