Difference of the 3 approaches of Wpf Localization addin

Coordinator
Feb 8, 2012 at 1:07 PM

I recieved a question about what is the difference of the 3 different localization approaches, supported by WPF Localization Addin.

Approach Pros Cons
LocText Xaml extension

1) Convinient notation in XAML.

2) Support switch of language on the fly.

3) Rich additional functionality (e.g. formatting, prefixes/suffixes, support of non-string types)

1) Need to integrate 3rd party component.

2) No compile-time check of correctness of key.

x:Static reference to resource code-generated class

1) Notation in XAML also convinient.

2) Compile-time check of correctness of key.

3) Simple.

1) Switching of language on the fly is not possible - need to recreate window.
Binding to resource wrapper 1) This is the only compatible with Silverlight (can be used with regular WPF also).

1) The longest notation in XAML and need to add wrapper class (though added automatically by addin).

2) No compile-time check of correctness of key.

Easy BAML

1) No runtime performance penalty (not tested).

2) No need to use special notation for localizable content in XAML.

3) No limited to dependency properties only.

1) Switching of language on the fly is not possible - need to recreate window.

2) UID attribute is added in XAML, though by minimum.