What is concatenation and why it’s a crime

It’s when you glue the phrase from pieces. Here’s an example:

"Bring it to me, " + heroName + ", and " + itemCount + " " + itemNamePlural + " will be yours."

"Find " + itemName + ", and it will be yours."

Looks fine for a programmer, neh? You see the code around it, the variables, the whole thing, right? Maybe you even have some comments, e.g., that item count here is always 10, 20, or 50.

The problem is that it’s never exported for translation this way. Translators only see the partial strings. They don’t see the variables that come between them. Sometimes, those partial strings aren’t even ordered the same way as they appear in code. Most of the time, they’re exported with no meaningful context at all.

If it’s a graph in Unreal and you have a lot of text nodes in there, and you’re using the default GUID keys, your text will be exported like this:

", and "
", and it will be yours."
" "
" will be yours."
"Bring it to me, "
"Find "

Imagine hundreds and thousands of pieces like this, with no hints about their order, about how they’re used, and what variables come between them. And even if it’s ordered properly, translators still don’t know what comes between those pieces. Even they do know that, say, from comments or answers, the sentence structure is set in stone with those hardcoded variables and that’s bad because grammar differs a lot between languages and some things just have to be moved.

It’s a mess that is impossible to translate well. It’s a pile of crap that no professional wants to work with—and good freelancers and agencies might refuse to take a project like this, leaving you with those who are either new to this or simply don’t care about the quality at all. So you’ll get a pile of crap as a result.

Code

Don’t ever concatenate the text you’re localizing. It’s only okay for debug strings that stay in English.For anything translatable, use Format with named variables instead. Simple as that.Is it slower? Absolutely. But not by much—and if it’s fast enough for Fortnite, it’s fast enough for your game.Epic has written their own Format because ICU implementation was too slow for real-time games. Now it’s fast.

Never do "Press " + keyName + " to jump", not in code, not in graphs. Do Format("Press {keyName} to jump", keyName) instead.

UI

Never split a phrase into several UI elements. It’s the same here: the pieces might get exported in incorrect order depending on the control names, with no meaningful context, and with no explanation of what comes between them. On top of that, translators need the ability to move things around because grammar and tradition differs a lot between languages. They’re okay with formatting tags, new lines, and variables: they know how it works if you’re using standard tags or name your own tags and variables properly. Be ready that your fancy big text will be moved to a different spot on the line or even to another line altogether. Be ready that the key you have in the middle will move to the beginning of the sentence in other language. Don’t expect the structure of the sentence to stay the same, ever.