Localization System not working (.po parse errors)

The Dashboard

After setting up the system for localization in the Localization Dashboard, and after translating exported .po files externally (i.e. Google Translator Toolkit), it will let me import localized text succesfully on the first attempt.

However, the problem I run into is that any language added after the first attempt will generate a
‘Error: Failed to parse Portable Object’ message, even though this Portable Object is generated identically to the one(s) on the first attempt.
This question from a few months ago describes the same problem:

Manual Setup

I understand the Localization Dashboard is an experimental feature, so instead I also followed all steps in the official Unreal Engine 4 documentation on localization
This procedure created errors of functions being deprecated, which makes me believe this documentation is outdated. That aside, after getting this procedure to function, it also reported the same ‘Error: Failed to parse Portable Object’ message.

A snippet of the error:

[2018.02.06-15.53.34:306][  0]LogInit: Display: Warning/Error Summary (Unique only)
[2018.02.06-15.53.34:307][  0]LogInit: Display: -----------------------------------
[2018.02.06-15.53.34:307][  0]LogInit: Display: LogPortableObjectPipeline: Error: Failed to parse Portable Object file I:/[PROJECT]/Development/develop/./Content/Localization/Game/zh-Hans/Game.po.
[2018.02.06-15.53.34:309][  0]LogInit: Display: LogInternationalizationExportCommandlet: Error: Failed to import localization files.

Yeah, the documentation is quite outdated and the dashboard is the way to go.

Can you send me your PO file (you can PM me on the forums if you don’t want to post it here). That error means that FPortableObjectFormatDOM::FromString is failing, and sadly that function gives no further logging data.

Thanks for sending me the PO files. It seems you have some unescaped new-lines in your PO data.

I’m guessing it’s Google Translator Toolkit that’s doing this, but it’s not actually a valid PO file (POedit also fails to open it correctly, but fails more gracefully).

After looked into the .po files, it seems like the Google Translator Toolkit breaks the .po files with their generated translation in most cases.
In some languages it breaks it in such a way that importing is still possible. Hence why the first attempt was succesful.

Sadly, the toolkit is the only way to check if all your text is properly set up for bigger projects without additional costs before sending it for external translation.

OneSky and POedit are recommended by to use for testing localization, however these do not support (free) auto translation.