Hi, i have a weird problem. I have one target in Localization dashboard and set up two languages in it. My language is native, the other language is english. All necessary texts are gathered, translated and compiled.
Problem is node “set current culture” (language and locale also for that matter) changes it only from english to native, when i try to do it other way around it does nothing. No matter which language code i use, the node returns true from the bool pin, but the texts won’t update back to english. Is there another necessary step i’m missing?
Are you calling the function “set current culture” within the editor (e.g. a PIE instance of your game)? In order to make localization to properly work, you need to run your game in a standalone mode. Try to package it, and see if the problem persists.
If it does, can you provide more information so that we can help you?
Thank you for your reply. I tried calling set current culture directly from widget event blueprint (on button change) or via function on custom instance blueprint. Right now it’s called again on widget with a simple flip flop instruction. Now the fun begins:
In PIE it works like i desribed., but you say it should be like that, so that’s not a problem.
Play as standalone makes it work like intended - it switches languages without problem.
BUT when i package and run from its executable it does not change language even once. I didn’t find any localization-specific settings in project settings but it looks like it does not attach localization files to it now?
OK, that was it. Thank you very much!
So my problem was - expecting PIE to properly change language which it can’t do and not including localization in package.
In order to include a culture into the packaged version of the game, you need to go into Project Settings → Packaging, and select the cultures you want your game to support in the “Localizations To Package” (you may need to expand the settings to see it), like the picture below:
You are welcome. I transformed this comment into an answer. If you marked it as resolved, this will help other people who have a similar problem.
Cheers