News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about languages (localizat... by tonnydourado on Sunday March 02, 2025 @01:29PM (#43233394)
I would add: a user's country of residency can be mapped 1-to-1 to the user's preferred language, or at least to a language the user understands.

So, SO many websites get this completely wrong.

Re:Falsehoods programmers believe about languages (localizat... by nutrientharvest on Sunday March 02, 2025 @01:41PM (#43233533)
I live in Poland and speak Polish but tend to have my devices set to English because of how low quality UI translations tend to be. The endless confusion this causes to software is amusing. Worst/best of all is Google Maps on Android, in which random parts of the interface, including voice directions, can independently be in Polish or English, and which is which changes on its own on a daily basis.
Re:Falsehoods programmers believe about languages (localizat... by lifthrasiir on Sunday March 02, 2025 @01:41PM (#43233540)
Windows is notorious for this---its code page (i.e. character encoding and thus effectively language and script) is directly tied to the locale. Most importantly this meant the same code page 950 (Big5) was used for both Taiwan and Hong Kong. Hong Kong had its own extension to Big5 called HKSCS, so they could be distinguished only by the OS edition. (Internally Big5+HKSCS has a separate code page 951, but AFAIK this wasn't exposed publicly.)
Re:Falsehoods programmers believe about languages (localizat... by praptak on Sunday March 02, 2025 @02:10PM (#43233835)
Sorting should probably have its own list.

"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.

Re:Falsehoods programmers believe about languages (localizat... by josemfb on Sunday March 02, 2025 @06:36PM (#43236494)
Native speaker of Spanish here (from Spain, living in Chile). “Ll” is sorted as two independent letters, same as “Ch”.

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)

Re:Falsehoods programmers believe about languages (localizat... by praptak on Monday March 03, 2025 @02:57PM (#43245965)
Yeah thanks for the correction, I don't know Spanish, I just remembered this example from a long list of international sorting oddities.
Re:Falsehoods programmers believe about languages (localizat... by 1-more on Thursday March 06, 2025 @12:54PM (#43283054)
I was JUST making a demo showing that sorting is different per locale (using String.prototype.localeCompare() in JS) and I was SHOCKED that Spanish no longer orders things "langosta, lugar, llama" but rather "langosta, llama, lugar." I had to redo things to do German vs Swedish sorting (In German, ä comes between a and b, whereas in Swedish it comes after z). So here I was thinking that the browsers were sorting naively, but in fact they are more with the times than I am.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Falsehoods programmers believe about languages (localizat... by AndrewStephens on Sunday March 02, 2025 @01:10PM (#43233211)
Back when I was making WIN32 apps (that at the time didn't have a layout manager), the hardest languages to localize for were:

* 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.

Re:Falsehoods programmers believe about languages (localizat... by stop50 on Sunday March 02, 2025 @03:02PM (#43234435)
In german words are often concanated resulting in words like Bodenseeschifferpatent(an license to drive boats with an bigger motor or an bigger sail). When you localise something german is easily one of the longest translations,
Re:Falsehoods programmers believe about languages (localizat... by AndrewStephens on Sunday March 02, 2025 @03:16PM (#43234564)
Yep, and it is not just the overall length of the text either. At least text with lots of short words can be have flexible line breaks.

I remember having to design dialogs with lots of empty space to accommodate the German translation.

Re:Falsehoods programmers believe about languages (localizat... by gweinberg on Sunday March 02, 2025 @01:11PM (#43233214)
Pretty much the only thing I could find in the whole list that I thought anyone might believe is "every language has words for yes and no". But here's another myth that I find it hard to understand how anyone could believe: "interface design decisions are generally made by programmers". If a site uses country flags to indicate languages, it probably wasn't a coder that decided to do that, and whoever did make the call didn;t believe there was a one-to-one relationship between countries and languages. I particular, pretty much everyone can think of at least one country other than the USA where they speak English.
Re:Falsehoods programmers believe about languages (localizat... by ks2048 on Sunday March 02, 2025 @02:20PM (#43233946)
Good list, but I imagine most programmers don't believe most of these falsehoods and are aware of a lot of these issues.

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.

Re:Falsehoods programmers believe about languages (localizat... by wintorez on Sunday March 02, 2025 @01:23PM (#43233331)
Number 1 falsehood I’ve seen is: Language = Locale
Re:Falsehoods programmers believe about languages (localizat... by java-man on Sunday March 02, 2025 @12:51PM (#43232986)
This is a good list, but it needs examples.
Re:Falsehoods programmers believe about languages (localizat... by tgv on Sunday March 02, 2025 @01:03PM (#43233130)
Some more obscure examples:

- 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.

Re:Falsehoods programmers believe about languages (localizat... by gus_massa on Sunday March 02, 2025 @01:44PM (#43233573)
We dropped the special case for ll and ch in 1994. I don't remember a special case for rr, but in any case it's not a special case now.

(It's interesting, because when computers were finaly powerful enough to remember all the weird cases, we dropped them.)

Re:Falsehoods programmers believe about languages (localizat... by tgv on Sunday March 02, 2025 @02:53PM (#43234330)
Damn, I should have known that. The ñ is an exception too, as its numerical value falls outside a-z, but it's sorted between n and o.
Re:Falsehoods programmers believe about languages (localizat... by gus_massa on Sunday March 02, 2025 @03:39PM (#43234813)
Yes, ñ is between n and o, except in an index in LaTeX that puts it at the end incorrectly.
Re:Falsehoods programmers believe about languages (localizat... by SAI_Peregrinus on Sunday March 02, 2025 @02:18PM (#43233931)
Not to mention positional cases in Hebrew, Arabic, and similar languages. E.g. Hebrew has 22 letters, only 5 of them have a final case.
Re:Falsehoods programmers believe about languages (localizat... by Groxx on Sunday March 02, 2025 @02:01PM (#43233741)
>Some languages have complex agreement between parts of the sentence, e.g. where gender of the verb must match the subject.

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.

Re:Falsehoods programmers believe about languages (localizat... by tgv on Sunday March 02, 2025 @02:57PM (#43234379)
That's rather simple agreement. The languages I know of are compatible with that. They either have a similar or simpler number agreement, at least for the third person. English has better examples, e.g. a vs an. If you template some text, you need to write agreement rules for that: "Are you interested in [a/an] {product}?"
Re:Falsehoods programmers believe about languages (localizat... by dizhn on Sunday March 02, 2025 @01:13PM (#43233239)
iİ , ıI

Neither google nor microsoft swift keyboard know that İt's is not the same thing as It's.

Re:Falsehoods programmers believe about languages (localizat... by 1-more on Monday March 03, 2025 @03:12PM (#43246117)
A great example I just saw was when I was reviewing a PR with translations into one of the Slavic languages that does Slavic plurals and it just avoided the problem by translating the sentence as "the number of things: {number}" whereas in other languages it was "{number} things". Genius, frankly.

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."

Re:Falsehoods programmers believe about languages (localizat... by thereckless1 on Sunday March 02, 2025 @01:06PM (#43233163)
I came across one of this cases in Python where .title() capitalizes every word of the sentence, but in Spanish you only capitalize the first letter.
Re:Falsehoods programmers believe about languages (localizat... by eesmith on Sunday March 02, 2025 @01:54PM (#43233664)
That refers to "title case", https://en.wikipedia.org/wiki/Title_case

> 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.

Re:Falsehoods programmers believe about languages (localizat... by immibis on Sunday March 02, 2025 @05:47PM (#43236083)
If you want to create a good piece of software (let's say Photoshop) in English, create it in English. If you want to create a good Photoshop in German, create it again but in German. You can use the English one as a base, but treat it as a new product that happens to have a lot of code reuse, not a variant of English Photoshop.

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.

Re:Falsehoods programmers believe about languages (localizat... by zvr on Sunday March 02, 2025 @05:47PM (#43236084)
I can easily add another one, on change conversion:

Changing case of a word can be performed by changing case of each letter individually.

Re:Falsehoods programmers believe about languages (localizat... by agateau on Wednesday March 05, 2025 @04:23AM (#43264592)
Another one: depending on the language, 0 is either singular or plural. In French it's singular and it's always fun to see the denial in the eyes of my French colleagues when I tell them that 0 is plural in English.