Can you recommend a good way to implement a Multilanguage system for a WPF app? The method I'm using right now involves XML, classes and a xaml extension. It Works fine in most of cases, but when I have to deal with dynamic labels or dynamic text in general it require some extra effort. I would like to let the programmer working only in the main problem and forgot the lang issues.
I am using the WPF Localization Extension. It is a really easy way to localize any type of DependencyProperty
on DependencyObject
s.
Text = {LocText ResAssembly:ResFile:ResKey}
INotifyPropertyChanged
for advanced use"this is the '{0}' value"
LocText
extension) .resx
) across all assemblies (also the dynamic loaded one at runtime) TypeConverter
) for it exists (extends LocalizeExtension
) Text
, upper Text
, lower Text
, Image
s, Brush
es, Double
and Thickness
UID
property untouched SpecificCulture
to use as IFormatProvider
(e.g. (123.20).ToString(LocalizeDictionary.SpecificCulture) = "123.20"
or "123,20"
) Thread.CurrentCulture
or Thread.CurrentUICulture
(can be changed easily)