jws wrote:
> The humanize middleware provides filters to pretty-print numbers with
> commas and such. I was about to add filters for dates when it occured
> to me that it should reflect I18N to to show proper US/Euro dates, etc.
>
> Before I spend time on it, can we discuss how this should work in
> Django? I currently have no knowledge of I18N.
>
Why middleware?
Current I18N only uses middleware to get locale preference from the browser.
Rest of the functionality are in template
tags and gettext family of functions.
IMHO, if we already used gettext convention for i18n we can use the same for
l10n (localization) (use LC_MONETARY and
other to store number, datetime and other locale dependent formats).
We should start by compiling list of all necessary functionality that must be
included and the start on the
implementation (somebody more knowledgeable than me in english can put this on
the wiki).
Basic functionality:
1. Number formating - format numbers according to current locale (decimal and
thousands separator)
* change validators accept numbers which are in current locale format
(i.e. to accept 1 000 000,658 same as 1000000.658)
this will require changes through SQL generation functions and validators
(or we can wait to validators go away and work inside field itself)
2. Money formating - based on number format but with currency display
3. Locale aware date and time formatting (currently we have some of that
functionality but it's far from complete)
Any other?
--
Nebojša Đorđević - nesh
Studio Quattro - Niš - SCG
http://studioquattro.biz/
http://djnesh.blogspot.com/ | http://djnesh-django.blogspot.com/ |
http://trac.studioquattro.biz/djangoutils/
Registered Linux User 282159 [http://counter.li.org]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django I18N" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/Django-I18N
-~----------~----~----~----~------~----~------~--~---