Localization problem

Hello,

I am starting up with localization system in UE4. I have put a line of code called every PostBeginPlay:

FInternationalization::Get().SetCurrentCulture("es");
AddTestLog(NSLOCTEXT("gameplay","gameinstance","hello").ToString());

I have generated texts using GatherText and my directory with Localizations looks like:

My manifest file:

My ES translation file:

But only one result I’m getting is:

LogTextLocalizationManager:Verbose: An attempt was made to get a localized string (Namespace:gameplay, Key:gameinstance, Source:hello), but it did not exist.

Why ?!

Hi again ksvg07,

Did you build the .locres files? The only files that the engine actually reads are the *.locres files, so if you didn’t generate them then they didn’t make it into the engine.

Everything else you mentioned looks good.

I have found that this issue was related to missing config in DefaultEngine.ini.
I had to put localization directory there under [Internationalization] category. Now everything looks ok.

Just to be more explicit so future readers know how to resolve this problem.

Depending on your situation, you may need to modify your DefaultGame.ini to point to your localization directory for your game.

[Internationalization]
+LocalizationPaths=%GAMEDIR%Content/Localization/Game

The above is an example of what may need to be added.