Make my app multilingual

What is the best way to get my C # / WPF application to support different languages?

I want my users to be able to choose a language.

thank

+3
source share
4 answers

There is a lot of information to digest, but the .Net infrastructure has built-in support for internationalization.

I would like to give you a simple example, but this is not a drag-and-drop solution. You will need to think a lot about how you are developing your application for this.

+5
source

: .NET Internationalization by Smith-Ferrier. . .

0

, , , ?

. "" , "firstnnamestring", , , , .

XML "" " ".

0

? case, , , TON .

In response to your comment:

Understand that this may not be the best solution, as I am not familiar with the built-in .NET support.

You can simply save a variable containing the language, for example strLang, and when you place the text, just ask your program to execute the case statement to display the correct language.

Switch (strLang)
{
 case "EN":
 //OUTPUT ENGLISH TEXT HERE
 break;
 case "SP":
 //OUTPUT SPANISH TEXT HERE
 break;
}

As you can see, it can really clutter up your code depending on the number of languages ​​and the amount of text, so you can check out the book Randy suggested.

-1
source

Source: https://habr.com/ru/post/1757204/


All Articles