Falsehoods programmers believe about languages (localization)
lexiconista.com
lexiconista.com
So, SO many websites get this completely wrong.
* German, simply because the German translations we were using were twice as long. I don't speak German so I couldn't judge if all those extra words were required.
* Simplified Chinese, because the default font in that language was huge - single characters would take twice the width (and more irritatingly, height) of an English character.
* Japanese, partly because the default font was also large but mostly because the multibyte character codes (this was before unicode support) for common words included bytes that were commonly used for separators in other languages. So things like backslash path seperators (which Japan didn't use) would have to be handled with extreme care in the code.
I remember having to design dialogs with lots of empty space to accommodate the German translation.
"Ordering of words follows simply from ordering on the letters in the alphabet" - nope, Spanish "ll" is not in the alphabet and is sorted like a single special letter.
"It's always lexicographical left to right or at least lexicographical in a single, consistent direction?" - nope, accents in French (è,é) are compared right-to-left.
Until 2010, the Real Academia Española (along the other Academias, of the various countries that speak spanish), considered both “Ll” and “Ch” distinct letters of the alphabet, and they were sorted accordingly [0][1][2].
[0] https://www.rae.es/dpd/abecedario (in Spanish)
[1] https://www.rae.es/dpd/ll (in Spanish)
[2] https://www.rae.es/dpd/ch (in Spanish)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Then, to reduce maintenance costs, you can fold the changes back in to the original software, using conditional statements and so on. This creates International Photoshop, of which English Photoshop, German Photoshop and Chinese Photoshop are just configuration options.
What you should not do is create International Photoshop first, and then specialize it for English and German and Chinese. You'll find places where the localizations don't fit into the framework you created, and then you'll either go back and change the framework, or (more likely) you'll just use English conventions in the non-English versions to make them fit the framework, and people in other countries will just live with with their language's equivalent of Engrish.
This is related to "a library must have 3 clients", "make a game not a game engine", etc, also "red green refactor". You have to make several specific things before you can generalize anything. If you don't make the concrete things first, you don't know what has to be generalized and how, and what doesn't. When you make the framework first, it has all the wrong generalization points.
Of course, if you already did this for a previous project so you already know how the framework should be, then you can try the framework-first approach. But beware - with that approach you might get stuck in the second system effect.
This comment has been delayed for hours by HN's rate limit.
Changing case of a word can be performed by changing case of each letter individually.
- Sentences in all languages can be templated as easily as in English: {user} is in {location} etc.
Some languages have complex agreement between parts of the sentence, e.g. where gender of the verb must match the subject.
- For every lower-case character, there is exactly one (language-independent) upper-case character, and vice versa.
Dutch capitalizes ijzer as IJzer.
- The lower-case/upper-case distinction exists in all languages.
Plenty of languages without: Hebrew/Arabic, “Chinese”. Japanese doesn’t even have spaces.
- All languages (that use the Latin alphabet) have the same alphabetical sorting order.
Spanish has ll, ch and rr in between k/m, c/d and q/s respectively.
Neither google nor microsoft swift keyboard know that İt's is not the same thing as It's.
(It's interesting, because when computers were finaly powerful enough to remember all the weird cases, we dropped them.)
English is one of these, in some cases. E.g. "cats chase mice" while "my cat chases mice". IIRC there are similar whole-sentence complications with tense too, but my brain isn't caffeinated enough to think of them at the moment.
Slavic plurals (not in every Slavic language don't quote me):
- when the name of the number ends with "one" you put the noun in the singular. So numbers like 1 and 21 and 100001 use singular nouns, but not 11 because its number is not "ten-one"
- When the name of the number ends with "two" through "four" you put the noun in the genitive singular so you say "I have two of chicken." Again, the teens don't fit because they aren't formed by "ten-two" etc.
- Otherwise: genitive plural "I have five of chickens."
It's just not always easy to deal with them correctly - and quicker/easier/cheaper to just do the thing that will be right for the large majority of your users.
> Title case or headline case is a style of capitalization used for rendering the titles of published works or works of art in English. When using title case, all words are capitalized, except for minor words (typically articles, short prepositions, and some conjunctions) that are not the first or last word of the title. ...
> The rules of title case are not universally standardized.