i am trying to globalization in my wpf application but i am confused about Culture, Language and flowdirection issue. I am trying to switch between english and arabic language in my application. I search about this issue but i am really confused.
I write simple code in wpf
<StackPanel>
<TextBlock
Background="Lavender"
FontSize="32"
Text="1+2=3"/>
</StackPanel>
and my codebehind
var culture = new CultureInfo("ar-EA");
culture.NumberFormat.DigitSubstitution = DigitShapes.NativeNational;
CultureInfo.CurrentCulture = culture;
CultureInfo.CurrentUICulture = culture;
i expect show numericals in arabic because i set DigitSubstitution to nativenational but does not show. And i said okey, let set language.. and i set language to ar-EA" in wpf. Like the following code
<StackPanel>
<TextBlock
Background="Lavender"
FontSize="32"
Text="1+2=3"
Language="ar-EA"/>
</StackPanel>
and nothing change.. After this, i try change flowdirection like following code
<StackPanel>
<TextBlock
Background="Lavender"
FontSize="32"
Text="1+2=3"
Language="ar-EA"
FlowDirection="RightToLeft"/>
</StackPanel>
And finally change Europian numericals to Western numericals. I do not let it go and try harder and remove language line in code and again Europian sytle numbers shown.
I am really curious what is relation between Culture, FlowDirection and Language..