Sometime between Windows 7 and Windows 8, Microsoft changed the localization of NaN
in de-DE (aka German (Germany)) from:
n. def.
to
NaN
There are people on Earth who speak a language other than English; and who speak English in a country other than the United States.
As a result, different cultures have different ways to display a value that is "Not a number". For example:
And German speakers use n. def.:
Note: What are all these variants of German, you're thinking? It's like the variants of English:
- English (United Kingdom)
- English (Ireland)
- English (Australia)
- English (New Zealand)
- English (Caribbean)
- English (Jamaica)
- English (Trinidad)
- English (Philippines)
- English (Canada)
- English (United States)
- English (Belize)
- English (Malaysia)
- English (India)
- English (South Africa)
- English (Singapore)
- English (Zimbabwe)
Sometimes between Windows 7 and Windows Server 2012, Microsoft changed (broke?) the localized string returned by GetLocaleInfo
with LOCALE_SNAN
for Germany (Germany) aka de-DE
:
| Locale | Windows 7 | Windows Server 2012 |
|------------------------|-----------|---------------------|
| German (Austria) | n. def. | n.def. |
| German (Germany) | n. def. | NaN |
| German (Liechtenstein) | n. def. | n.def. |
| German (Luxembourg) | n. def. | n.def. |
| German (Switzerland) | n. def. | n.def. |
I'm hoping someone can confirm the regression, or perhaps that it's a declared bug.
I'm hoping someone can give a workaround (aside, of course, from detecting the OS version and returning custom values.
I'm hoping that someone on the localization team might see this question and weigh in. Perhaps @MichaelKaplan; who is the single greatest source of localization and globalization information.
Really, i just want someone to say, "Yes, you're right, Microsoft broke it. We are where we are, so let it go."
I don’t think it qualifiers as a bug, because the CLDR data specifies that the localized string is NaN for most languages, including all variants of German. Software vendors increasingly use CLDR data, one way or another, so I think you should try and have the CLDR info for German changed if you think it is wrong.
However, consider the pros and cons. “NaN” is really a technical concept, referring to data (bit pattern) that is expected to be a number but isn’t a valid number. It is true that it may appear in output to end users, but you really need to understand the programming concept involved in order to understand what it means. The odds are that people who understand that know the string “NaN” but might fail to recognize a localized version thereof. I would even say that e.g. to a JavaScript programmer, “n. def.” can be misleading, as it suggests “nicht definiert”, which sounds like undefined
, which is quite distinct from NaN
.
(I am probably responsible for the Finnish localization in CLDR of this entry. The word “epäluku”, which would correspond to “Unzahl” in German I suppose, sounded good to me. But on second thought, it was probably all too clever. There is really no natural-language concept that corresponds to the concept.)