This Code project article provides a good overview of the different ways of localizing an application based on specific cultures:
PermalinkWhat are the best practices for implementing a localizable application?
How can I set the Language property to the current user’s UI language ?
If you need to set the ‘Language’ property to the current user’s UI language, use the following code.
[C#]
text1.Language = System.Windows.Markup.XmlLanguage.GetLanguage(
System.Globalization.CultureInfo.CurrentUICulture.IetfLanguageTag);
PermalinkHow can I set the substitution property by overriding the default substitution ?
In the following example, the first TextBlock does not have the Substitution property set, so the algorithm displays Arabic digits as expected. However in the second TextBlock, the substitution is set to ’European’, overriding the default substitution for Arabic numbers and hence European digits are displayed.
[XAML]
<Page x:Class='WindowsApplication.Window1'
xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
Title='Code Sample' Height='300' Width='300'
>
<StackPanel>
<TextBlock Language='ar-SA'
FlowDirection='RightToLeft'>????: 1+2=3
</TextBlock>
<TextBlock Language='ar-SA'
FlowDirection='RightToLeft'
NumberSubstitution.Substitution='European'>????: 1+2=3
</TextBlock>
</StackPanel>
</Page>
PermalinkWhat are the three types of Localizability Attributes and how to use them ?
There are three types of attributes:
A. Category – This specifies whether a value should be modifiable from a localizer tool.
B. Readability – This specifies whether a localizer tool should read (and display) a value.
C. Modifiability – This specifies whether a localizer tool allows a value to be modified.
Permalink
Share with