There are several hard problems when designing software.
I'm not talking about computer science hard problems like NP-complete things.
I mean hard problems of design, and internationalisation is one of the worst.
Let's imagine you started a social network. Let's imagine that you made it for English-speaking users.
First problem is when someone called Chloë joins,
'cause Chloë has an umlaut above her 'e' and is angry that she can't put her name in properly.
So, okay, you say "I'll open up and add a few more accent characters."
Well, then someone Icelandic calls in, and he's got an eth in his name. Looks like that.
Looks like that. Sounds like 'th.'
"Fine," you say. "So let's use all of Unicode."
And then someone probably breaks your site because there's control characters in Unicode that break everything.
OK, fine, so you work out which characters are allowed to be used in names and you just stick to those.
I mean, that's like 30,000 characters when you include all of Chinese, Japanese, and Korean text,
but never mind! You put it in.
And then you start getting some users in other countries.
First problem you get is France.
Your French translator calls and says,
"Look, you've got a "Like" button here, and what I want to put in is "J'aime" -- "I like" --
but it's not quite big enough? I need you to make the button bigger?"
And there's problems like this all over the place where sentences that take five syllables in English
actually take a whole two-paragraph description in some other language.
So you tweak the design. You make it so that the lengths of texts can change.
And then you start working out that what you really want to do is have some kind of drop-in system.
So, in English, you can just put in "%NAME likes this."
And then you can send that over to the translators and --
see, this is where I should really speak more than one language --
but they can send back -- um, I'm gonna make up a language here --
ah, they can say something like "Mana %NAME adilo,"
which, in their language, means "so-and-so likes this."
Great! That system's gonna work! You can just send a load of text blocks to them and they can send it b--
"Hello? Ah, Italy. Yes. What's with -- right, you need to know the gender of everyone using this network.
Why do you need to know that?"
Italian language relies on gender.
The words in the sentence change depending on whether you're talking about a man or a woman.
Well, that's, that's irritating 'cause you haven't asked users for gender.
Facebook have this exact problem.
But, OK, you start asking and the translators start sending back strings,
and now, of course, anyone who doesn't fit immediately into male or female,
and, if that surprises you, you need to get out more,
but anyone who doesn't fit into those categories, well, now they're angry that they have to go into one or the other.
You have to ask them, "Well, languages don't support that. Which one are we going with?"
And, in fact, there's a lot of translators calling back and saying they can't support that.
OK. You move past that. You dam down the storm and it moves on,
and then you get a call from France again.
They say, "By the way, you've got a singular and a plural here, but you can't use the plural for 0.
We don't say that something has 'no likes, we say that it has 'no like,'
and 'one like,' and then 'two likes.'"
So, okay, I can put a special case in for that. And a few others call in and say,
"Um, yeah, we don't just have singular and plural. We have singular and dual and plural.
Our words change depending on whether there's one of something, two of something, or many of something."
OK. Great. Right. Special case in for that.
And then, then, your Polish translator calls and they say,
"Right. We've got a paucal."
Paucal is where you have a singular and then you have a different plural
depending on whether the number of things ends with 2, 3, and 4, or some other digit!
OK. Great. Fine. Put a special case in for that.
And then your Romanian translator calls
"Yeah, we need a different plural for any group of objects greater than 20."
OK. And then you finally get every different plural rule for every language in there,
and now the translators are vaguely happy.
Then your Icelandic translator calls, and they say,
"Right. You've got this '%NAME' thing that I'm just meant to replace."
Icelandic changes how the names appear depending on what else is in the sentence.
You might have "Tom." Then it might become "Toma" or "Tomi,"
and there are whole names that this doesn't work with because they don't fit the Icelandic pattern.
You put all that in somehow, and then, then your German translator calls and is like,
"Look, you've got this uppercase and lowercase in.
You wanna put stuff in big, bold uppercase letters sometimes, and I get that,
but we have this double 's' character. When you turn it to uppercase, it becomes two S's,
except sometimes when it doesn't, like in geographic names. Can you deal with that?"
OK. Right. Yes. I'll make sure we deal with that,
but that's not even the start of it, because then your Arabic translator calls, and they say,
"Right. You're doing this thing where you take an excerpt from a post.
You're taking the first 50 characters and then you're just putting a '...' on the end,
and that works for some languages, but not in Arabic. You can't just chop a word in half,
because the letters in one bit of the word change depending on the letters elsewhere.
They all merge together into one nice, flowing thing,
and computers can deal with that, but you can't just crop it halfway through!"
OK. Fine. Go with that. Then the Arabic translator goes on to say,
"By the way, you're dealing with right-to-left text, right?"
Of course you're not. You haven't thought of that because, because surely all languages go left-to-right.
No, Arabic, Hebrew, they go right-to-left.
And you say, "OK. I can kind of flip the whole design around so it still works that way?"
And they say, "Yeah, that would work, but then you're gonna have left-to-right names in the middle of right-to-left text,
because you're gonna talk about someone who has a name in a different character set.
Just make sure it can deal with that."
Oh... Then, if you're British, your American translator calls, or vice versa, and they say,
"You need to make sure the date format is right."
Because Americans, for some bizarre reason, do month-day-year. Brits, day-month-year.
And, by the way, in America, the week starts on a Sunday, and in Britain, the week starts on a Monday,
so you've gotta change all your calendars around,
and, by the way, Europe wants 24-hour clocks and America wants 12-hour clocks, and -- numbers!
Oh, God, we haven't started on numbers yet!
Because Europe wants "256.341,2." The comma and the full stop, or the period.
If you're American, they're around the other way!
Yeah, OK, you can deal with that and then, then the icing on the cake is your Indian translator calls
and says they have the Indian numbering system.
You don't say "100,000." They have the crore and the lakh, so they would group it like that.
And it all becomes incredibly, overly complicated and the last time I did a rant like this,
I said that what you do is you get someone else's timezone code and you treat it as a black box.
That, that doesn't work here because languages are infinitely more complex and subtle,
and there are so many changes that will be unique to whatever it is you're designing.
The black box that Facebook uses for translation won't work for whatever you're doing.
It won't work if you're designing software for Windows or Mac or Linux or iPhone.
You can use certain references, certain functions, certain little things to make it easier,
but ultimately you are going to have to go out and translate it and deal with all of this wonderful mess,
or you do what programmers have done for many years, and say,
"Yeah. We're just producing it in English."
(SEAN RILEY) -We'd like to thank Audible.com for sponsoring this Computerphile video.
They've got loads of books online for you to choose from.
If you go to audible.com/computerphile, there's a chance to check out a book for free.
Today, I'd like to recommend "Ghost in the Wires,"
which is this story about Kevin Mitnick, one of the most infamous hackers there's been.
It had me captivated from the sample you can listen to on Audible's website,
and it is just fascinating and gripping stuff.
So get over to audible.com/computerphile, try out a book for free,
and thanks, once again, to Audible.com for sponsoring this video.
(DR. STEVEN BAGLEY) -"...part of our heartbeat response at the top. But as we look down,
we've actually started to get some interesting information out of the server.
In this case, we can see what the referring URL was..."