Search code examples
c#.netwpfmultilingual

multilingual wpf application


I have a WPF application (in English) and I would like to let users to select different languages. I have read some possibilities to change languages in runtime applications, but I only want to choose a language during installation time and never change it.

Do you think the fastest and easiest way to do it is developing different versions of the program (changing only text language) and let the user to select one of them during the installation?? Probably to repeat code only changing textbox or labels is not very elegant, but notice that I have the application finished in English and I don´t need to change language at runtime.


Solution

  • I think the solution proposed by Aghilas is good; but you can use StaticResource instead of using DynamicResource in step 3, DynamicResource is not required in your case as you are not going to chnage the language while application is running.

    Also have a look at these articles having details about using Resx files for localization in WPF -

    Localizing a WPF Application with ResX Files

    WPF Localization

    WPF Localization Guidance - Whitepaper