Displaying numbers in languages

50 views
Skip to first unread message

אורי

unread,
Nov 28, 2023, 11:00:39 PM11/28/23
to django...@googlegroups.com
Hi,

Since Speedy Match was only in English, I displayed numbers in the English format - with commas as thousand separators. For example today it writes:

The total number of active members on the site is 12,221, of which 2,581 members entered the site in the last week.

Now, I translated Speedy Match into other languages, such as French, German, Spanish, Portuguese and Italian. In these languages I still use the same number formatting as in English:

Le nombre total de membres actifs sur le site est 12,221, dont 2,581 membres entrés sur le site au cours de la dernière semaine.

Die Gesamtzahl der aktiven Mitglieder auf der Website beträgt 12,221, von denen 2,581 Mitglieder die Website in der letzten Woche betreten haben.

Is it better to use formats.number_format and display the numbers in each language differently? Or is it OK to keep it this way? I’m specifically asking people who speak languages such as French, German, Spanish, Portuguese, Italian and Dutch. How important it is to change the thousand separators?

Thanks,
Uri.

Vincenzo Celano

unread,
Nov 29, 2023, 1:37:05 PM11/29/23
to django...@googlegroups.com
Ciao

אורי

In italian 
I think the problem is not important in this case but for example, if you have a car sales website and an italian will find a Ford Mustang Mutch-E at this prince:
60,865 $ an italian person will read 60 $ and 8 hundred and 65 cents not 60 thousands and 8 hundred and 45 $
:-)
  
Ciao!

‪Il giorno mer 29 nov 2023 alle ore 05:00 ‫אורי‬‎ <u...@speedy.net> ha scritto:‬
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABD5YeEBFAJK_v4er294-GDqLrRFOsiS1bY1rxmdQve3PNXcig%40mail.gmail.com.

Swarup Selvaraj

unread,
Dec 7, 2023, 9:30:48 AM12/7/23
to Django users
ciao Vincenzo,

Thank you for the explanation :)

Hi Uri 

The functionality we are interested in is called as Internationalization and Localization (i18n and l10n - funny shortcut)

We can enable these (USE_L10N=True USE_I18N=True) in settings.py file.
If we ensure the right locale is set, django will render numbers appropriately according to the user's locale.

Regards,
SWARUP Selvaraj


Reply all
Reply to author
Forward
0 new messages