Is there an approach to localization that will work in both WPF and Silverlight? I am mainly looking to hear about what ways would be built in and available to both frameworks.
2 Answers
Although I have come across various techniques and tols for localizing WPF aplication but only tool which mentions support for both WPF and Silverlight is Lingobit software localization tool - http://www.lingobit.com/solutions/wpf/wpf_localization.html
Some other helpful articles -
http://www.codeproject.com/Articles/37339/WPF-Localization.aspx
1 Comment
Sisulizer can localize WPF and Silverlight applications. You can either localize each XAML and RESX file using Sisulizer and the compile satellite assembly files by yourself, or you can just select Visual Studio project or solution file, Sisulizer localizes XAML, RESX, images, etc and finally compiles localized satellite assembly files.
In case of Silverlight you can also select the XAP file. Sisulizer reads the content (i.e. assemblis and resources) and creates multilingual or localized XAP files.
Sisulizer's approach to localize also XAML in addition of RESX only makes development of XAML based application much easier. You no longer have to move strings from XAML to RESX
<TextBlock Text="{Binding Path=Resource1.HelloText, Source={StaticResource LocalizedString }}"/>
and
<data name="LocalizedString" xml:space="preserve">
<value>Hello World</value>
</data>
but you can just enter text directly into XAML.
<TextBlock Text="Hello World"/>
Later XAML is much much easier to write, read and maintain.