logoalt Hacker News

PennRobotics • today at 9:12 AM • 4 replies • view on HN

I was raised in the US and work in Germany, but I set my region to Ireland because, as you say, it represents my preferences and daily work best.

If I set my locale to en_US, I get Letter-size paper and USD and MM/DD/YYYY as defaults---all different from what I use every day.

Setting de_DE means writing "a million and change" as 1.000.000,69 which sometimes causes problems copying data from one window to another but mostly confuses me.

An Irish locale gives me preferred formats for numbers, dates, currency, language, and print defaults.


Replies

rafram • today at 3:29 PM

Well-written software should support language and region independently - en-DE should be valid, as should de-US and zu-JP. In practice, a lot of software hardcodes the regions it thinks are valid for each language.

Thankfully the web is moving in the right direction. Browsers do the right thing when you call new Intl.DateTimeFormat('en-DE').format(new Date()), for instance.

account42 • today at 9:55 AM

> Setting de_DE means writing "a million and change" as 1.000.000,69 which sometimes causes problems copying data from one window to another but mostly confuses me.

It also breaks programs all the time because a lot of languages make the users locale the default for formatting and parsing numbers even though there are many use cases where you want a neutral, fixed format.

It's sad that POSIX-likes are still stuck on the concept of a fixed set of locales instead of something more flexible where you can have a sensible choice of RFC 3339 dates with untranslated English text and your local currency but formatted with a . decimal separator. Instead we have to use hacks like en_DK that only partially fix the issue for some.

➕ show 1 reply
Moru • today at 10:01 AM

I'm a Swede. Half Sweden (maybe exaggerated :-) is using English as main language and wants it on their computer so we set GB in windows. But now we have to live with pound as currency, some weird date format and number format. It's a lot of work to get everything correct so in the end many goes back to Swedish language because the number and date formats are more important. Not to mention distance in miles...

And every version of windows you have less control over which format to use where. In w95 you could easily set all these manually for each unit. Now I have to search the web to find instructions for the simplest things.

➕ show 1 reply
CatMustard • today at 12:01 PM

> Setting de_DE means writing "a million and change" as 1.000.000,69

I'm Irish and one of my pet peeves is when a site shows prices in e.g. Usd as $10,000.50 and then when I change the currency to Euro it now decides I must want it formatted as 10.000,50€, a format that completely breaks my brain.

Actually using the fact that I have an Irish locale apparently isn't necessary because 'this is how """Europeans""" do money'.