Skip to content

Commit 30dd124

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents b634d59 + 7423918 commit 30dd124

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ answer newbie questions, and generally made Django that much better:
9797
Andy Dustman <[email protected]>
9898
Andy Gayton <[email protected]>
9999
100+
Annabelle Wiegart
100101
Anssi Kääriäinen <[email protected]>
101102
102103
Anthony Briggs <[email protected]>

django/conf/locale/de_CH/formats.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@
2525
"%d.%m.%Y %H:%M", # '25.10.2006 14:30'
2626
]
2727

28-
# these are the separators for non-monetary numbers. For monetary numbers,
29-
# the DECIMAL_SEPARATOR is a . (decimal point) and the THOUSAND_SEPARATOR is a
30-
# ' (single quote).
31-
# For details, please refer to the documentation and the following link:
32-
# https://www.bk.admin.ch/bk/de/home/dokumentation/sprachen/hilfsmittel-textredaktion/schreibweisungen.html
28+
# Swiss number formatting can vary based on context (e.g. Fr. 23.50 vs 22,5 m).
29+
# Django does not support context-specific formatting and uses generic
30+
# separators.
3331
DECIMAL_SEPARATOR = ","
3432
THOUSAND_SEPARATOR = "\xa0" # non-breaking space
3533
NUMBER_GROUPING = 3

django/conf/locale/fr_CH/formats.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
2828
"%d/%m/%Y %H:%M", # '25/10/2006 14:30'
2929
]
30+
31+
# Swiss number formatting can vary based on context (e.g. Fr. 23.50 vs 22,5 m).
32+
# Django does not support context-specific formatting and uses generic
33+
# separators.
3034
DECIMAL_SEPARATOR = ","
3135
THOUSAND_SEPARATOR = "\xa0" # non-breaking space
3236
NUMBER_GROUPING = 3

docs/topics/i18n/formatting.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,13 @@ Limitations of the provided locale formats
189189
Some locales use context-sensitive formats for numbers, which Django's
190190
localization system cannot handle automatically.
191191

192-
Switzerland (German)
193-
--------------------
194-
195-
The Swiss number formatting depends on the type of number that is being
196-
formatted. For monetary values, a comma is used as the thousand separator and
197-
a decimal point for the decimal separator. For all other numbers, a comma is
198-
used as decimal separator and a space as thousand separator. The locale format
199-
provided by Django uses the generic separators, a comma for decimal and a space
200-
for thousand separators.
192+
Switzerland (German, French)
193+
----------------------------
194+
195+
The Swiss number formatting traditionally varies depending on context. For
196+
example, monetary values may use a dot as decimal separator (``Fr. 23.50``),
197+
while measurements often use a comma (``22,5 m``). Django’s localization system
198+
does not support such context-specific variations automatically.
199+
200+
The locale format provided by Django uses the generic separators, a comma for
201+
decimal and a space for thousand separators.

0 commit comments

Comments
 (0)