This may be something you consider "obvious", but given that it's the single most common translation problem we have, I think it's important to mention. It's less a bug, and more something that gets completely overlooked: Words often aren't used in the same order as the base language.
For example: Say you want to translate Welcome, [name]
. The naive approach is to simply translate "Welcome," and slap them together in the code, trans("Welcome,") + username
- this is not correct, since some languages won't use that pattern.
It should instead be something like this, to borrow Python syntax:
trans("Welcome, %(name)s") % {'name': username}
This requires the translators to understand that %(name)s
is a placeholder and must be kept. But it allows them to be a whole lot more flexible in the languages that use a different syntax. For example, the above translation in Japanese would be (according to Google Translate):
ようこそ、%(name)sに
Surprise! There's an extra character at the end that European languages don't use, that couldn't have been added using the naive code.
I don't know if the European languages listed in the question have similar issues (although in a more complex example, I could see the Latin-based languages being different than the Germanic ones), so this might not directly apply to the OP - but should still be helpful to others.