Translation editor insert new line?

Hello, this might seem like a trivial question but i haven’t been able to encounter a solution for my problem. I’m at the stage of localizing my game and wanted to try the new 4.8 experimental features, so everything was fine until i had a text with multiple lines. When i try to localize said text i can’t insert a new line on the localized text by hitting Shift + Enter or entering \n or entering \r\n, entering said characters in the text doesn’t insert a new line or anything, The text just renders as is. Is there a way to insert new lines in the translation editor? or maybe a simple workaround?, i tried modifying the .po and gathering the text or importing it within the localization dashboard but it doesn’t work.

Hi Dylan,

Sorry the translation editor isn’t working out for you. I’ll create a ticket for the newline issue to get fixed.

In the meantime, I recommend going the .po route. You should be able to do an export and then either manually edit the file or use something like poedit. Once ready you can go to the loc dashboard, click import and select your modified po file. You then need to perform a build/compile/cook (I forget what term is used in the dashboard). After that you should see the translations in your game.

You mention having trouble with the import/export flow. Try it again and let me know if you have any issues.

It’s working the way you said but i’m experimenting a little issue. In some parts of the game i have text which length is more near 100 words and several line breaks. When i try to modify said text for import, the Localization dashboard will fail unless i do one of two things:
Either get rid of the line breaks completely or instead of translating the whole text, translate X quantity of words (generally no more than 10), import and repeat.

hmmm… can you send up some samples of your *.po which isn’t working?

It may be related to the format you’re saving the *.po file in or perhaps you aren’t treating the line wraps correctly - they’re treated a little weird in po in my opinion. Have you tried making edits using Poedit? Doing so would rule out any format mistakes being made.

Yes it probably was because i edited the .po manually and might’ve it wrongly. Thanks anyway for your help

This multiline problem is still an issue in 4.12.

Any news on it getting implemented? Thanks!

Still not fixed in 4.17.2

still not fixel in 4.18.3 …

Lol 4.19 idem

Was just looking into localization today.
… this issue makes the editor completely useless.
Going to make a bug report via the new system.

It’s completely insane that the translation editor can’t handle a single carriage return.

We need to
gather →
Export script →
find the right po on disk →
edit it in some notepad →
Import script →
Build ressource.

I had to develop a full exporter to excel to handle a human (designer) friendly editor.

Just because there is no shift/control/alt enter in the text component ?
come on.

I found out how to add in new lines in localized text.

Unfortunately, the localization dashboard and translation editor will not let you use “shift+enter” to add a new line in your translated text. The workflow described by Sarge is not very good either (especially if your PO export fails). Here is the easiest way to add in newlines in translated text:

  1. Open your Content directory and then look for the “localization” folder. Within this folder, you’ll see the list of your supported localizations created within the localization dashboard. Open up the language folder you need to modify.
  2. You should see two files. The first one is “Game.archive”, and the second one is “Game.locres”. The locres seems to be a binary file, the “Game.archive” file is a plain text JSON file.
  3. Open the “Game.archive” file using notepad, notepad++, or your favorite plaintext editor.
  4. Within the Game.archive file, you should see the namespace for your string assets. You’ll see a children section with an array of comma separated values, and each value set will contain the source text, the translated text, and the reference key. Use the key from your localization dashboard to do a quick lookup search in your text editor.
  5. You’ll want to find the translation text you want to modify. Simply add in “\r\n” anywhere you want a line break in your translated text.
  6. Save the “Game.archive” file and return to UE4.
  7. If you have the translation editor open and are viewing the language you just modified, you will need to close it and reopen it so that it pulls the changes you made from disk. You should see your line breaks within the translated text.
  8. Within the localization dashboard, you must click on “Compile Text” in order for the changes to be updated in your game.
  9. Launch your game with a “Stand Alone” player, switch to the localized language you modified, and verify that the localized text with line breaks looks good. Repeat steps 5-8 until you are happy.

Hello Guys!

I am sorry to reply to a realy old thread, but I have an issue that is related to newlines in localization.

I have a string in my string table like this:
image

In my .po it looks like this:
#. Key: newliner
#. SourceLocation: /Game/Milestone/test.test
#: /Game/Milestone/test.test
msgctxt “test,newliner”
msgid “asd\nasd”
msgstr “”

if I add a translation like this:

#. Key: newliner
#. SourceLocation: /Game/Milestone/test.test
#: /Game/Milestone/test.test
msgctxt “test,newliner”
msgid “asd\nasd”
msgstr “something”

It marks as needs review, even the source is exactly the same. What am I doing wrong here?