Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#16188 closed Cleanup/optimization (fixed)

Added locale formats for swiss german language

Reported by: Silvan Spross Owned by: Jonas Obrist
Component: Internationalization Version: dev
Severity: Normal Keywords: locale, formats
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The swiss german number formats are slightly different than the german ones:

DECIMAL_SEPARATOR = '.'
THOUSAND_SEPARATOR = "'"

http://lh.2xlibre.net/locale/de_CH/

Attachments (2)

de_CH_formats.diff (1.6 KB ) - added by Silvan Spross 14 years ago.
adds de_CH/init.py and de_CH/formats.py
ticket-16188.diff (1.5 KB ) - added by Merijn Bertels 14 years ago.

Download all attachments as: .zip

Change History (16)

by Silvan Spross, 14 years ago

Attachment: de_CH_formats.diff added

adds de_CH/init.py and de_CH/formats.py

comment:1 by Jonas Obrist, 14 years ago

Triage Stage: UnreviewedReady for checkin

by Merijn Bertels, 14 years ago

Attachment: ticket-16188.diff added

comment:2 by Merijn Bertels, 14 years ago

Add a new patch to the root of the project.

comment:3 by Jannis Leidel, 14 years ago

Patch needs improvement: set

So I'm not actually sure this is correct, since according to the government regulations the dot is only used for monetary values, not generally for numbers. http://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de

comment:4 by Jannis Leidel, 13 years ago

Triage Stage: Ready for checkinAccepted

Bumping done to accepted since this need clarification.

comment:5 by Jonas Obrist, 13 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

My two cents on the DECIMAL_SEPARATOR issue here:

Unfortunately, there seems to be no real consensus on what the right way to write numbers in Switzerland is. While the link above shows the official way to do it, that rule seems to be applied very rarely.

I have checked with two major newspapers in Switzerland, hoping they would write proper (Swiss-) German, only to find that both use another System:

NZZ (nzz.ch) uses a dot for monetary values and either a dot or a comma (it's not consistent throughout the site) for percentage values and a dot for 'normal' values. Overall, they seem to be very inconsistent. Even more 'shocking' to me as a Swiss is that they use a comma as thousand separator, which is very unnatural for me.

Tagesanzeiger (tagi.ch) is inconsistent too. For values in graphs, they use dots. For values in article text they use commas.

I personally agree with the patch as it is. The "10'000.12" format appears most natural to me. So in my opinion, the patch is ready for checkin.

comment:6 by Malcolm Tredinnick, 13 years ago

Triage Stage: Ready for checkinAccepted

I'm going back to accepted on this. Comment 5 just pointed out a whole bunch of widely read sources that do NOT use the single quote for the separator. "Looks most natural to me" isn't really the winning argument here in the face of so much alternate public usage (in Swiss publications).

We can leave this open for a couple more months to see if somebody can come up with reasonable evidence (in, say, Wikipedia terms) that the quote is used everywhere "on average". If not, we should leave it as is and not commit this change.

In short: "Patch needs evidence"

comment:7 by Adam Nelson, 13 years ago

Patch needs improvement: set

comment:8 by Jonas Obrist, 13 years ago

So according to the specification in comment 3, DECIMAL_SEPARATOR should be a comma by default and THOUSAND_SEPARATOR a space, since single quotes are (according to Wikipedia [1]) only used in hand writing.

However this would be wrong for monetary values. Django cannot know if a value is a monetary or non-monetary value, so maybe the format should default to the more broad use case of non-monetary values.

Is there any place in the docs where we could document this?

[1] http://en.wikipedia.org/wiki/Decimal_mark#Examples_of_use

Last edited 13 years ago by Jonas Obrist (previous) (diff)

comment:9 by Jonas Obrist, 13 years ago

Patch needs improvement: unset

comment:10 by Jonas Obrist, 13 years ago

Owner: changed from nobody to Jonas Obrist

comment:11 by Jannis Leidel, 13 years ago

Triage Stage: AcceptedReady for checkin

comment:12 by Jannis Leidel, 13 years ago

This was accidentally committed with a faulty commit message due to PEBKAC in r17472.

comment:13 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

comment:14 by Claude Paroz <claude@…>, 12 years ago

In 24c7d828b00c5cfb203addca06c82fc30d2e989a:

Moved de_CH/formats.py in its correct location

Refs #16188.

Note: See TracTickets for help on using tickets.
Back to Top