3 ms·
Smells: * If you're concatenating sentence bits, you're doing it wrong * If you're formatting numbers, dates, times, or durations by hand, you're doing it wro
by yafbum 3y ago
Smells:
* If you're concatenating sentence bits, you're doing it wrong
* If you're formatting numbers, dates, times, or durations by hand, you're doing it wrong
* If you're formatting strings with placeholders and you don't know the gender and number of your placeholders, your translators are going to have a bad time
There are two more important rules that this article doesn't mention
* Write long descriptions of what the thing is that you're asking someone to translate (button label, menu item, dialog header...), and include a screenshot. Translating very short strings without context is very difficult.
* Ask your translators to do a global once-over QA pass once in a while to detect inconsistencies and weirdness. Once I dealt with a product that had three tabs, and two of the tabs were translated identically. Each tab header translation made sense on its own, but as distinct tab headers side by side, it made no sense to use the same word.
- troad 3y ago> If you're concatenating sentence bits, you're doing it wrong. This is completely impractical for anything other than the most static content. Take the most basic line from any single imagined game. E.g. “Your [Abrams tank] has [fired] a [lead-tipped bullet] at a [green] [dragon].” Ok, let’s say you have fifteen unit types, five attack types, thirteen types of ammo, thirty enemy type adjectives, and fifty enemy nouns. This is one announcement type out of hundreds in your game (Your green dragon was spotted by an enemy Lizardman! Your attack dirigible is running low on hydrogen!) You’re going to - what - precompose all of this? And pay to have your trillions of lines translated into a dozen languages? At that point it would seem more cost effective to use your i18n budget to finance some kind of monolingual colony on Mars, and just sell your product there. Yes, this is going to be hard to concat programmatically, and yes, you’ll likely make some mistakes and might need to rethink some phrasing. One language’s ‘blue’ is another language’s ‘wine dark’. One language’s adjective (he is tall) is another language’s verb (he towers). But “don’t concatenate” is simply not useful advice, because it is not actually actionable for most projects. People act like i18n is some great moral-ethical challenge, and if you fail, you will mortally offend millions. You won’t. You might sound silly, but people are patient, and you’ll recover. No matter how hard you try and plan, you will, at some point, get localisation wrong. Oh, you’ve thought of gender? That’s great! What about case? Ok, but that only works for languages with nominative-accusative alignment. What about languages with ergative-absolutive alignment? Or a tripartite system? And this is just nouns - wait until we get to verbs!
- numpad0 3y agoI think concatenate is a keyword here - it will lead to your fire lead-tipped tank Abrams in some languages. Token replacing should be far more okay("Player enacted laissez-faire policy")
- thfuran 3y agoInterpolation is potentially problematic but frequently necessary. Concatenation is pretty much always flat out wrong.
- yafbum 3y agoAs others have said, I was talking about concatenation as opposed to interpolation. Interpolation still has challenges. It's hard to make arbitrary sentences with many placeholders work with agreement. But concatenation is almost always a bad choice. Also am not talking about this as an absolute moral-ethical challenge. In the examples I gave, it's usually less work long term on the developer to do the right thing, and a more efficient use of translation budget because you're not spending money to get convoluted translations that sound confusing or don't sound idiomatic. Why bother translating if your users are going to use English anyways?
- troad 3y ago> Also am not talking about this as an absolute moral-ethical challenge. I find myself frustrated by devs perpetually talking about localisation as an impossible, semi-mystical 'gotchya' that causes untold cultural offence if mishandled, and I took that frustration out on your comment, and I apologise. I agree that keeping localisation in mind early is better than remembering about it too late.
- troad 3y agoI note the replies, but respectfully disagree that concatenation versus interpolation is in any way a meaningful distinction. Analysing “green house” as either “green”.concat(“ house”) or “{} {}”(green, house) is not meaningfully different, and runs into the same i18n problem (the order should be reversed for many languages, like Spanish and French).
- micheljansen 3y ago> Ask your translators to do a global once-over QA pass once in a while to detect inconsistencies and weirdness. Once I dealt with a product that had three tabs, and two of the tabs were translated identically. Each tab header translation made sense on its own, but as distinct tab headers side by side, it made no sense to use the same word. Even the very big ones get this wrong. I believe AliExpress still uses the same translation in Dutch for the word “register” as they do for “login” (both can be translated as “aanmelden”). Kind of an important distinction. Seems like this should be so easy to detect (look for duplicates on the right hand side of the translations where there are none on the left).
- numpad0 3y agoOh I’ve seen that AliEx one. Apparently the word “sign in” in Chinese and “sign up” in Japanese happens to share the literal(“登録”), and it’s the exact same binary in UTF-8, so some software might have no clue about that.