On Tue, 2008-09-23 at 08:51 -0700, pihentagy wrote:
> On Sep 23, 12:28 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> > Wiadomość napisana w dniu 2008-09-23, o godz. 12:21, przez pihentagy:
> >
> > > How can I print a number using the locale's thousand separator and
> > > decimal?
> >
> > > Basically I hoped ther is a template filter, but floatformat doesn't
> > > have thousand separator, and seems to use decimal point always.
> >
> > Take a look at Babel package and Django helpers -http://babel.edgewall.org/
> 
> Ok, but there is also the module locale.
> Should I really use other libraries for just displaying a number in a
> page? Django supports translations, doesn't it supports printing
> numbers and currency honoring the currently selected language?

We can't use Python's locale module in Django. It doesn't allow
different locale settings in different threads.

Prior to 1.1 there will be some changes made there to add support for
number and date printing and validation (Karen's already pointed to one
of the relevant tickets). Currency display is probably out of scope,
since that's not actually particularly locale-dependent: it's specific
to the currency itself, not the output locale (display USD 1.25 as JPY
125,000 or something is just wrong).

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to