c# Language.resx doesn't work when I install my compiled application

168 views Asked by At

I have an winform c# application that can change between multiple languages. When execute my application in visual studio the language changes well, but when I compile the application and install it in my computer it does nothing.

This is my code to change the current language:

public void ChangeCurrentLanguage(string selectedLanguage)
{
    System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(selectedLanguage);
    System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(selectedLanguage);
}

And this is my code to get some strings from the resx of the current language:

ChangeCurrentLanguage("es-ES");
string downloadSucess = LanguageResx.ClientLanguage.game_DownloadSucess;

As I said works well in visual studio, but when I install it into my computer it does nothing.

I have all of my different languages in resx files and I just change the current language resx image

And I have a setup for the user to install my application.

setup image

Dll 2

Dll 3

Dll 4

Dll 5

POSIBLE SOLUTION

Posible solution, the only problem is that the guy in the answer talk about using resources.dll and I dont have that dll or dont know how to get it and use it to make it work.

1

There are 1 answers

0
Napo On BEST ANSWER

Nevermind, I'm just stupid, I only have to move the folders of the resx translations to my setup folder