0

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.

Napo
  • 533
  • 1
  • 5
  • 13
  • @mjwills I will show you with images **In visual studio:** spanish: https://i.stack.imgur.com/6uPhD.png english: https://i.stack.imgur.com/chQVr.png **In my compiled application already installed in my computer:** spanish: https://i.stack.imgur.com/mHEy8.png english: https://i.stack.imgur.com/gfYIE.png – Napo Nov 30 '20 at 22:42

1 Answers1

0

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

Napo
  • 533
  • 1
  • 5
  • 13