开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜