Localization support for C # console application

I created a simple console application to display the string "Hello World". Later, I cited resource files to support different languages ​​and put the translated version of "Hello World". I am trying to run console.exe on a Chinese OS and expect to see "Hello World" which will be displayed in Chinese. Unfortunately, it shows English.

After analysis, it turned out that adding .resx files creates a separate folder in the project with .resource dll for each language (satellite assembly). So, if I put .exe along with other folders and ran, then "Hello World" will appear in Chinese. If I delete the folders (.resource) and then run only .exe, it will display "Hello World" in English again.

Is there a way to create a .exe file with all resource files mapped to each other. So I do not need to place folders with .exe before running .exe.

By the way, I'm trying to access strings using Strings.STRING_NAME, where Strings is the default resource file name. Other language string files are of the type Strings.fr.resx, Strings.de.resx.

Please help with this.

Thanks in advance.

+4
source share
3 answers

The solution is here:

fooobar.com/questions/113546 / ... (is it possible to single-line multilingual deployment of Windows Forms (ILMerge and satellite assemblies / localization)?)

0
source

These additional assemblies are called Satellte assemblies. They are saved separately, so you do not need to deploy all languages ​​if you need only one.

From Introduction to Satellite Assemblies ;

, , , . . , , (, en-US). , / .

0

, , .

, - , , , , ? - :

     System.Threading.Thread.CurrentThread.CurrentUICulture = new   System.Globalization.CultureInfo("en-US");
     System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
0

All Articles