diff options
| author | Annabelle Wiegart <44520920+annalauraw@users.noreply.github.com> | 2025-10-23 16:11:52 +0200 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-10-23 10:14:20 -0400 |
| commit | 71267c97db211f1d7f1b8b794ceb2167a7619a4d (patch) | |
| tree | d5e347f9c112af38e984e53dc6ff2f5748feb379 /django | |
| parent | 9b37bd5fe73b0d614ad8e503071d6f7bf2bdf6b2 (diff) | |
[5.2.x] Fixed #35095 -- Clarified Swiss number formatting in docs/topics/i18n/formatting.txt.
Co-authored-by: Ahmed Nassar <a.moh.nassar00@gmail.com>
Backport of 74239181252ca73bebb84789856f5d8937d421b4 from main.
Diffstat (limited to 'django')
| -rw-r--r-- | django/conf/locale/de_CH/formats.py | 8 | ||||
| -rw-r--r-- | django/conf/locale/fr_CH/formats.py | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/django/conf/locale/de_CH/formats.py b/django/conf/locale/de_CH/formats.py index f42dd48739..bf048462bd 100644 --- a/django/conf/locale/de_CH/formats.py +++ b/django/conf/locale/de_CH/formats.py @@ -25,11 +25,9 @@ DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M", # '25.10.2006 14:30' ] -# 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). -# For details, please refer to the documentation and the following link: -# https://www.bk.admin.ch/bk/de/home/dokumentation/sprachen/hilfsmittel-textredaktion/schreibweisungen.html +# Swiss number formatting can vary based on context (e.g. Fr. 23.50 vs 22,5 m). +# Django does not support context-specific formatting and uses generic +# separators. DECIMAL_SEPARATOR = "," THOUSAND_SEPARATOR = "\xa0" # non-breaking space NUMBER_GROUPING = 3 diff --git a/django/conf/locale/fr_CH/formats.py b/django/conf/locale/fr_CH/formats.py index 84f065713e..0a63166e80 100644 --- a/django/conf/locale/fr_CH/formats.py +++ b/django/conf/locale/fr_CH/formats.py @@ -27,6 +27,10 @@ DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M", # '25/10/2006 14:30' ] + +# Swiss number formatting can vary based on context (e.g. Fr. 23.50 vs 22,5 m). +# Django does not support context-specific formatting and uses generic +# separators. DECIMAL_SEPARATOR = "," THOUSAND_SEPARATOR = "\xa0" # non-breaking space NUMBER_GROUPING = 3 |
