Game localization paths not added in editor

I correctly set up the localization pipeline, the commandlets are running fine and the locres files are residing in the right folders. I also have some external localization source files which are correctly gathered and included in the archives. I now want to access the localization table ingame with FText::FindText().

When using FText::FindText() I noticed that the keys are not in the loc tables. I narrowed down the problem and found the following lines in TextLocalizationManager.cpp:

if(ShouldLoadGame) { LocalizationPaths += FPaths::GetGameLocalizationPaths(); }

ShouldLoadGame is false when building and loading up the editor because the function FApp::IsGame() returns false. When I build with the commandline argument -game then it works but I want it to work while working with the editor.

Any thoughts on this?

Hi HCK,

We actually never load the game localization content from within the editor because there is a possibility the editor could save over your source text with the translated version. Until we sort that out we don’t plan to enable game loc in the editor, and I don’t recommend you do either.

You can however use the “play in standalone” option to run the game from within the editor with specific game loc. You’ll need to open the advanced options and specify the following commandline argument. -culture=ko

If you’re only interested in running the non-cooked version of the game with loc you can run the editor exe with the -game commandline plus the loc one I mentioned above.

Thank you for clarifying this!

I can live without localization in the editor but I thought it would be a good idea to store some game text outside of the game, not in source code and not in blueprints. When you load dozens of skills from an excel table, for example, each with their own ID which is the key for looking up the title and description texts in the loc tables. When these strings are not loaded they are simply not there and I can’t display anything, unlike FText variables in blueprints or code which are only not translated.

What would you suggest to solve this problem?

hmmm… if the text from your excel tables is built into it’s own loc target then you could add that to the Engine localization paths.

Less easy option would be to insert some additional logic at the point you are invoking the FindText() function and if it fails attempt to pull the value directly from the excel document. This has the benefit of not requiring a loc build in order to see the updated text for you source locale.