I’ve got strange behavior with the localization system in UE4 (and 5).
I’m trying to switch the language of my game in runtime. I have two languages (English and Russian) completely filled in Localization Dashboard.
I have an UI with two buttons, each one makes a simple call of the Set Culture function with the correct key.
And this is where things get interesting. It works only once in Editor and in Shipping build. I can switch from the current language to the new one, but not back to the previous one. I’ve got all the correct calls in FInternationalization::SetCurrentCulture, but the game’s text fields are unchanged.
For some reason, it works perfectly if I launch a standalone preview from the editor.
It also works if I restart the game while using the “save to config” check in Set Culture - so the culture is saved correctly and updated after the restart. But not in runtime.
Is this the expected behavior for the localization system? Am I trying to do something that I shouldn’t be doing?
Okay, spent another hour on this. Your project works, mine doesn’t. And after trying everything, I’ve found the difference. My default language was not English. I’ve been using “temporary” language as a basic one, so I can freely change both my translations (as far as I’ve read yesterday, I don’t need this anymore). So, I’ve removed it and made English my default language. And now it just works as expected. Wow