xaml - Multilanguage in WPF -
Can you recommend a good way to implement a multilingual system for WPF Ape? The method I am using now includes XML, Classes, and XML Extensions. It works fine in most cases, but when I have to deal with dynamic labels or dynamic text, some extra effort is usually required. I want to allow the programmer to work only in the main problem and forget long issues.
I am using DependencyObject s.
- An easy way to localize a real stable state on any type of
DependencyProperty - supports writing style like binding Like
text = {LocText ResAssembly: ResFile: Reskey} - Works with .resx-fallback mechanism (like en-us -> en
- Works with general dependency properties
- Works with control
- Strengthens culture (for example "It's English to be English at all times
- Can be used in XAML (actually: P) without any additional namespace
- Back to bind localized values in dynamic generated controls Code
- implements
INotifyPropertyChangedfor advanced use - supports string formatting eg
"This" {0} 'value is - Supports prefix and suffix values (currently
- In productive systems (such as my public relations product)
- By switching the language to the runtime no Titleslis
- can be used with any resource file (
.resx) in all the assemblies (dynamic weight even on runtime)- No preliminary process is required (eg "to register a special localized dictionary (Xyz call for xyz ")
- Design is available at time (MS Expression Blend, MS Visual Studio 2008 (General & SP1)
- Changes in the selected time are possible at design time
- can localize any type of data, unless it is present for a converter (
TypeConverter) (extensionLocalizeExtension)- Created in support
text, uppertext, lesstext,images,for brushes,doubleandthickness- does not affect any memory leaks
UIDdoes not leave the property leftusing specificcultureas theIFormatProvider(Example(123.20). Ostring (localizanational spectrulture) = "123.20"or"123,20")- Resource check And provides some functionality to achieve
Thread Current cultureorthreads The content does not modify the code on the ukricure (it can be easily changed)
Comments
Post a Comment