#4147: Add some i18n hooks to DateFormat
---------------------------------------------+------------------------------
          Reporter:  orestis                 |         Owner:  garcia_marc
            Status:  new                     |     Milestone:             
         Component:  Internationalization    |       Version:  SVN        
        Resolution:                          |      Keywords:  dates month
             Stage:  Design decision needed  |     Has_patch:  0          
        Needs_docs:  0                       |   Needs_tests:  0          
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by shell_dweller):

 I think a better way would be to use Babel which also has a Django
 implementation (http://babel.edgewall.org/wiki/BabelDjango). It uses the
 Unicode CLDR which provides standard date representations. Specifically it
 makes use of "wide" representations which for Greek are equivalents of
 possessive case:

 {{{
 >>> import babel
 >>> from babel.dates import format_date
 >>> from datetime import date
 >>> now = date.today()
 >>> print format_date(now, format='d MMMM yyyy', locale='el')
 21 Δεκεμβρίου 2009
 >>> print format_date(now, format='long', locale='el')
 21 Δεκεμβρίου 2009
 }}}

 What UCLDR cannot be used for is interpolations like "from %s to %s" %
 (month1, month2). This is however in general case is a non trivial problem
 which belongs rather to the domain of computational linguistics then to
 internationalization.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4147#comment:23>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en.


Reply via email to