Localization not working in packaged game

Hi Guys,

I’m having a problem with getting localization working in our packaged game. I have followed all the steps in the documentation and the translations work fine when I run from the editor.

I have checked this thread : link text

And made sure all my config files are set up correctly. I have checked the package itself, and the localisation files (locres etc) are all being packaged in the .pak file.

When debugging the package build, I’ve found that this line seems to be the problem:

ICUInternathinalization.cpp line 285

if (UResourceBundle* ICUResourceBundle = ures_open(nullptr, StringCast<char>(*CanonicalName).Get(), &ICUStatus))

which is returning U_USING_DEFAULT_WARNING for the ICUStatus parameter. From the ICU documentation it says the following:

U_USING_DEFAULT_WARNING indicates that
the default locale data was used;
neither the requested locale nor any
of its fall back locales could be
found.

Which is baffling as they are all in there. If I drag next statement marker down past this ‘if’ check on line 288:

if (ICUStatus != U_USING_DEFAULT_WARNING || AllowDefaultFallback)

The game loads, and the language I am requesting is set and my translations show up in game! So the assets are obviously in there and correct, but there must be something about my setup that isn’t correct.

Can anyone help with this issue?

Thanks,

Matt

I’ve found that if I add a ‘true’ to the FindOrMakeCulture() call from within SetCurrentCulture, so AllowDefaultFallback is used to circumnavigate the U_USING_DEFAULT_WARNING check, it all seems to work fine.

I suspect that our problem is that we are using ‘en’ etc instead of ‘en-US’ etc in our setup. If anyone has had the same problem and can confirm that this is the root cause it would be good to hear from you.

Cheers,

Matt

I have this exact same problem (even the problem that you linked to.) I’ve changed both these things and still no translation. The en translation seems to work (keys are replaced by the translated text,) but not our de translation. Never works… Except in standalone play in the editor. Then it works.

Copying the Source\Engine\Content\Internationalization\All folder to the PackagedGame\Engine\Content\Internationalization folder fixed it. Neither the unreal frontend nor the in-editor packaging copied the german (de) base localization files.

Along with the thread:

1 Like

Are your project packaging settings set to package cultures other than “English Only”? You may need to change that to EFIGS (or something suitable for the cultures you need).

how? where are these settings?

Project Settings → Packaging, and you can find “Localizations to Package” and “Internationalization Support” under the advanced section of the Packaging category.

2 Likes

Thank you! This helped me a lot.

it solved my problem, thank you!

UE5 Localization will not work in a packaged game. Languages ​​change smoothly in the game engine, but when we pack the game, the language settings do not work. Topics in all forums Is there an updated solution for ue4 to ue5?

1 Like