Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[Django] #35095: Monetary values in Switzerland discrepancy

53 views
Skip to first unread message

Django

unread,
Jan 8, 2024, 3:14:36 PM1/8/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------------+------------------------
Reporter: Andrea Angelini | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
At this link (https://docs.djangoproject.com/en/5.0/topics/i18n/formatting
/#switzerland-german) the documentation says:

Switzerland (German) [...] For monetary values, **a comma is used as the
thousand separator** and a decimal point for the decimal separator.

At this link
(https://github.com/django/django/blob/main/django/conf/locale/de_CH/formats.py)
the comment says:

For monetary numbers, the DECIMAL_SEPARATOR is a . (decimal point) and
**the THOUSAND_SEPARATOR is a ' (single quote)**.

Unfortunately I'm not familiar with the `de_CH` locale, therefore I can't
say which one is correct.

--
Ticket URL: <https://code.djangoproject.com/ticket/35095>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 8, 2024, 3:38:05 PM1/8/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------

Reporter: Andrea Angelini | Owner: nobody
Type: Uncategorized | Status: closed
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* cc: Claude Paroz (added)
* resolution: => invalid
* status: new => closed
* component: Documentation => Internationalization


Comment:

As far as I'm aware, both the documentation and comments match.

> # These are the separators for **non-monetary numbers**. For monetary
numbers,
> # the DECIMAL_SEPARATOR is a . (decimal point) and the
THOUSAND_SEPARATOR is a
> # ' (single quote).
> DECIMAL_SEPARATOR = ","
> THOUSAND_SEPARATOR = "\xa0" # non-breaking space

So for non-monetary numbers, a comma is used for decimal and a space for
thousand separators, exactly the same format is
[https://docs.djangoproject.com/en/5.0/topics/i18n/formatting
/#switzerland-german documented].

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:1>

Django

unread,
Jan 8, 2024, 3:41:20 PM1/8/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: nobody
Type: Uncategorized | Status: new

Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Andrea Angelini):

* status: closed => new
* resolution: invalid =>


Comment:

I agree with you that for non-monetary numbers, the documentation and the
code match.

What I pointed out is that, **for monetary numbers**, the documentation
says "a comma is used as the thousand separator", whilst the comment in
format says "the THOUSAND_SEPARATOR is a ' (single quote)".

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:2>

Django

unread,
Jan 8, 2024, 3:48:16 PM1/8/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
--------------------------------------+------------------------------------

Reporter: Andrea Angelini | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* type: Uncategorized => Cleanup/optimization
* easy: 0 => 1
* stage: Unreviewed => Accepted


Comment:

> What I pointed out is that, **for monetary numbers**, the documentation
says "a comma is used as the thousand separator", whilst the comment in
format says "the THOUSAND_SEPARATOR is a ' (single quote)".

OK, but it's not something that Django uses, so it's just a real minor
typo in docs/comments.

For the future, that kind of cleanups doesn't require a ticket, feel-free
to check sources and submit PR.

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:3>

Django

unread,
Jan 8, 2024, 3:50:33 PM1/8/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
--------------------------------------+------------------------------------
Reporter: Andrea Angelini | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* cc: Silvan Spross (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:4>

Django

unread,
Jan 10, 2024, 11:21:19 AM1/10/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
--------------------------------------+------------------------------------
Reporter: Andrea Angelini | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by HimaTeju):

Replying to [comment:3 Mariusz Felisiak]:


> > What I pointed out is that, **for monetary numbers**, the
documentation says "a comma is used as the thousand separator", whilst the
comment in format says "the THOUSAND_SEPARATOR is a ' (single quote)".
>
> OK, but it's not something that Django uses, so it's just a real minor
typo in docs/comments.
>
> For the future, that kind of cleanups doesn't require a ticket, feel-

free to check sources and submit PR.

Hii! I am very new to open source, and I want to fix this typo, please
help me out. So where exactly is the typo? In the documentation or the
comments?

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:5>

Django

unread,
Jan 10, 2024, 5:46:01 PM1/10/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner:
Type: | NeilPen2005
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by NeilPen2005):

* owner: nobody => NeilPen2005
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:6>

Django

unread,
Jan 11, 2024, 7:39:11 PM1/11/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala

Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Neil Pendyala):

* has_patch: 0 => 1


Comment:

pull request: https://github.com/NeilPen2005/django/pull/1

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:7>

Django

unread,
Jan 11, 2024, 11:29:29 PM1/11/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 1 => 0


Comment:

Patch should be sent via GitHub PR targeted to the `main` Django branch.
Do you have any Swiss friend who can confirm this change?

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:8>

Django

unread,
Jan 12, 2024, 4:13:12 AM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Alexander Lazarević):

In the comment is a reference to a seems to be official document:
https://www.bk.admin.ch/bk/de/home/dokumentation/sprachen/hilfsmittel-
textredaktion/schreibweisungen.html

{{{
Ziffern werden in Dreiergruppen zusammengefasst. 123 456 789

Besteht eine Zahl aus vier Ziffern, so wird die erste nicht abgesetzt,
sondern eine Vierergruppe gebildet. 1234

Zahlen, die aus mehr als vier Ziffern bestehen, werden von der Endziffer
aus in Dreiergruppen zerlegt. 22 333 / 222 333 / 1 222 333
}}}

{{{
Digits are grouped into groups of three. 123 456 789

If a number consists of four digits, the first is not separated, but a
group of four is formed. 1234

Numbers that consist of more than four digits are broken down into groups
of three starting from the final digit. 22 333 / 222 333 / 1 222 333
}}}

And
{{{
Die früher gebräuchliche Schreibung mit Apostroph sollte nicht mehr
angewendet werden, weil sie für die Drucklegung wieder rückgängig gemacht
werden muss. Nicht korrekt ist die Gliederung mit Punkten oder Kommas.
}}}

{{{
The previously used spelling with an apostrophe (aka single-quote) should
no longer be used because it has to be reversed for printing. The
structure with periods or commas is not correct.
}}}

So the THOUSAND_SEPARATOR seems to be the non-breaking-space (as
implemented) and not `single-quote` or `coma` (as in the PR), regardless
of plain numbers or monetary value.

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:9>

Django

unread,
Jan 12, 2024, 4:24:03 AM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Alexander Lazarević):

* needs_better_patch: 0 => 1


* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:10>

Django

unread,
Jan 12, 2024, 4:25:06 AM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Andrea Angelini):

I stumbled upon that discrepancy just by chance. I have no Swiss friend
that can confirm it. Checking the sources with Google seems to favor the
single quote.

What I also found is that Angular `CurrencyPipe` seems to use the single
quote as thousand separator.

https://github.com/angular/angular/issues/46038#issuecomment-1335706796

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:11>

Django

unread,
Jan 12, 2024, 4:49:21 AM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:9 Alexander Lazarević]:


> So the THOUSAND_SEPARATOR seems to be the non-breaking-space (as
implemented) and not `single-quote` or `coma` (as in the PR), regardless
of plain numbers or monetary value.

This PR is not about values used by Django, it's about comments and docs.
Please check previous
[https://code.djangoproject.com/ticket/35095?replyto=9#comment:3
comments].

Django uses separators for **non-monetary numbers** i.e.
{{{#!python


DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = "\xa0" # non-breaking space
}}}

However, both docs and comments mention that for **monetary values**
format is different. The question is, should we change a comment to the:
> "For monetary numbers, the DECIMAL_SEPARATOR is a . (decimal point) and
the THOUSAND_SEPARATOR is **a , (comma).**"
or should we change docs to the:
> "For monetary values, a **single quote** is used as the thousand
separator and a decimal point for the decimal separator."

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:12>

Django

unread,
Jan 12, 2024, 4:53:08 AM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Andrea Angelini):

It seems that the official documentation pointed out by Alexander say that
a non-breaking space as thousand separator should be used for *any*
number, monetary values included.

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:13>

Django

unread,
Jan 12, 2024, 6:47:09 AM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

If it's outdated, we can remove notes about `THOUSAND_SEPARATOR` for
monetary values from both docs and comments.

Claude, What do you think?

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:14>

Django

unread,
Jan 12, 2024, 6:47:29 AM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0


* has_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:15>

Django

unread,
Jan 12, 2024, 5:23:48 PM1/12/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

Django has no way to differentiate formatting between monetary values and
other values. This formatting difference is a Swiss peculiarity, AFAIK. So
the current setting values are valid for most number, except monetary
values. I admit the comment is not very clear about that and could be
improved. By the way the `fr_CH` formats file could have the same comment,
as the situation is the same.

In my apps, I generally add an `|unlocalize` filter each time I have to
display a monetary value, so the `.` is used to format those numbers. This
solution is fine for Swiss-only apps, but fails in multi-country apps. We
could imagine implementing a special `monetary` filter/tag, but it looks
overkill if it's just for one country, considering that Swiss people will
also understand when a comma is used for monetary values, it's just not
the official way of printing them.

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:16>

Django

unread,
Jan 13, 2024, 9:31:21 PM1/13/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Alexander Lazarević):

Replying to [comment:12 Mariusz Felisiak]:


> This PR is not about values used by Django, it's about comments and
docs. Please check previous
[https://code.djangoproject.com/ticket/35095?replyto=9#comment:3
comments].

That was my understanding from the beginning and I commented accordingly
in the PR. Sorry for not being clear about that here.

> However, both docs and comments mention that for **monetary values**
format is different. The question is, should we change a comment to the:
> > "For monetary numbers, the DECIMAL_SEPARATOR is a . (decimal point)
and the THOUSAND_SEPARATOR is **a , (comma).**"
> or should we change docs to the:
> > "For monetary values, a **single quote** is used as the thousand
separator and a decimal point for the decimal separator."

Here I disagree, because from what I read in the referred official
document there is **no special thousand separator for monetary values**.
So my suggestion in the PR was to change the comment (and docs) to:
> "For monetary numbers, the DECIMAL_SEPARATOR is a . (decimal point)."

But maybe others can point me to the definition of a special thousand
separator for monetary values in the referred document? I wasn't able to
find one skimming the doc.

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:17>

Django

unread,
Jan 13, 2024, 9:40:27 PM1/13/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Alexander Lazarević):

Replying to [comment:16 Claude Paroz]:


> This formatting difference is a Swiss peculiarity, AFAIK.

And as far as I can tell there is also difference when formatting monetary
values given in Franken or Rappen. So it's **Fr. 15.40** but **0,13 Rp.**

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:18>

Django

unread,
Jan 13, 2024, 9:53:31 PM1/13/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Alexander Lazarević):

Well, on the other hand when I look at latest
/usr/share/i18n/locales/de_CH on my system, it seems to be outdated as
well and no help on the question:

{{{
...
date "2007-09-23"
...
LC_MONETARY
int_curr_symbol "CHF "
currency_symbol "CHF"
mon_decimal_point "."
mon_thousands_sep "<U2019>"
mon_grouping 3;3
positive_sign ""
negative_sign "-"
int_frac_digits 2
frac_digits 2
p_cs_precedes 1
p_sep_by_space 1
n_cs_precedes 1
n_sep_by_space 1
p_sign_posn 4
n_sign_posn 4
END LC_MONETARY

LC_NUMERIC
decimal_point "."
thousands_sep "<U2019>"
grouping 3;3
END LC_NUMERIC

}}}

With ' (U+2019 RIGHT SINGLE QUOTATION MARK)

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:19>

Django

unread,
Jan 13, 2024, 10:12:19 PM1/13/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Alexander Lazarević):

So finally I vote to change the comment from:

{{{
# these are the separators for non-monetary numbers. For monetary numbers,
# the DECIMAL_SEPARATOR is a . (decimal point) and the THOUSAND_SEPARATOR
is a
# , (comma).
}}}

to:

{{{
# These are the separators for non-monetary numbers.
# The decimal separator for monetary numbers is a . (decimal point), but
Django
# will always use DECIMAL_SEPARATOR for any number.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:20>

Django

unread,
Jul 8, 2024, 10:14:38 AM7/8/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Neil
Type: | Pendyala
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by romibi):

Swiss guy here.
Keep in mind that just because the goverment specifies some formatting for
governmental publications doesn't mean the rest of the country uses it.
Commonly used in IT and default swiss locale settings on current operating
systems is '.' as decimal separator for ALL values (see
https://de.wikipedia.org/wiki/Dezimaltrennzeichen#Schweiz )
{{{
Im IT-Bereich ist in heute gängigen Betriebssystemen (Windows, macOS,
Linux usw.) in der schweizspezifischen Spracheinstellung der Punkt als
Dezimaltrennzeichen definiert, auf dem Ziffernblock schweizerischer
Tastaturen wird ebenfalls der Punkt verwendet.
}}}

So my vote is: change DECIMAL_SEPARATOR to '.' and ignore the government
link and refer to wikipedia in the documentation.

The removal of USE_L10N and this "wrong" locale gave me quite some
headaches when we upgraded from 2.2 to 5.0 just now.
Glad I finally found out how to override this in a custom format file
(https://docs.djangoproject.com/en/5.0/topics/i18n/formatting/#creating-
custom-format-files)
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:21>

Django

unread,
Sep 18, 2024, 5:50:06 PM9/18/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Aditya
Type: | Chaudhary
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aditya Chaudhary):

* owner: Neil Pendyala => Aditya Chaudhary

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:22>

Django

unread,
Sep 22, 2024, 3:59:46 PM9/22/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Aditya
Type: | Chaudhary
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Matthias Kestenholz):

My mother tongue is swiss german. I agree with romibi here but I don't
have strong feelings either way. Like Claude I also have a preference
towards using . and not , as the decimal separator, it seems to be more
common, and using a comma often leads to questions from clients.
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:23>

Django

unread,
Oct 6, 2024, 9:10:36 AM10/6/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Aditya
Type: | Chaudhary
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/18596 PR] to only adjust
documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:24>

Django

unread,
Oct 9, 2024, 5:49:10 AM10/9/24
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Aditya
Type: | Chaudhary
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:25>

Django

unread,
Apr 12, 2025, 3:04:29 AMApr 12
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Ahmed
Type: | Nassar
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ahmed Nassar):

* owner: Aditya Chaudhary => Ahmed Nassar

Comment:

Hi, I will work and address this ticket. I'll submit my PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:26>

Django

unread,
Apr 20, 2025, 2:52:52 AMApr 20
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Ahmed
Type: | Nassar
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ahmed Nassar):

* needs_better_patch: 1 => 0

Comment:

I've submitted a pull request that addresses this issue by updating the
Swiss German (de_CH) number formatting to match common IT practices.

Changes made:
- Changed decimal separator to dot (.) and thousand separator to single
quote (')
- Updated documentation to explain context-specific formatting limitations
- Added references to Swiss standards and common practices

These changes align with how numbers are typically formatted in Swiss IT
environments and operating systems, while acknowledging the context-
specific nature of Swiss number formatting.

PR: https://github.com/django/django/pull/19396

Please review and let me know if any adjustments are needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:27>

Django

unread,
Apr 26, 2025, 3:50:48 PMApr 26
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Ahmed
Type: | Nassar
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by pasoulier):

If we are going to change the de_CH locale, we should also change the
fr_CH locale.
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:28>

Django

unread,
Apr 27, 2025, 7:55:17 AMApr 27
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Ahmed
Type: | Nassar
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 0 => 1

Comment:

Looked into this with pasoulier (who has knowledge of Swiss usage) at the
DjangoCon Europe sprints. State of play seems to be:
- earlier voices on this ticket agreed to touch docs only
- later voices on this ticket said the value of `DECIMAL_SEPARATOR` is
worth changing
- folks seem more indifferent to changing the value of
`THOUSAND_SEPARATOR`

Claude, are you paraphrased correctly in comment:23 that you think we
should change `DECIMAL_SEPARATOR`? I only see in comment:16 that you
employ workarounds yourself but am not sure if you think we should change
Django's behavior for one or both?

Marking PNI since at the very least comment:28 needs addressing.

We also investigated the government docs and found them to be both overly
specific and internally inconsistent in their examples, which reinforces
the suggestion in comment:21 to ignore it.
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:29>

Django

unread,
May 5, 2025, 9:36:13 AMMay 5
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Ahmed
Type: | Nassar
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ahmed Nassar):

* needs_better_patch: 1 => 0

Comment:

I've updated Swiss number formatting in fr_CH locale to match common IT
practices and consistency
--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:30>

Django

unread,
May 14, 2025, 11:39:53 AMMay 14
to django-...@googlegroups.com
#35095: Monetary values in Switzerland discrepancy
-------------------------------------+-------------------------------------
Reporter: Andrea Angelini | Owner: Ahmed
Type: | Nassar
Cleanup/optimization | Status: assigned
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35095#comment:31>
Reply all
Reply to author
Forward
0 new messages