home / django_tickets / tickets

tickets: 4147

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
4147 2007-04-25 00:37:53 2013-05-19 23:37:59 2022-03-06 03:30:36.067765 Accepted new Internationalization New feature Normal dev   Add some i18n hooks to DateFormat Django's handling of i18n is fairly good, but one major point that it doesn't handle well (together with almost everything else out there) is the formatting of dates. The most obvious example is the display of the month names. While in English there is only one case of nouns, in many other european languages there are more, which have different spellings. For example, in Greek, in order to be able to diplay full-word months and capture all possible sentence formats, one needs three cases: 1. The subjective case (eg. en: January, 2007 - el: '''Ιανουάριος''', 2007) 2. The posessive case (eg. en: 23th of January - el: 23η '''Ιανουαρίου''') 3. The objective case (eg. en: Entries posted on January - el: Δημοσιεύσεις που έγιναν τον '''Ιανουάριο''') I'm sure this is common in most european languages, but I'm not an expert; Please everybody comment on this. To implement this in django, I suggest the following: * Add MONTHS_POS, MONTHS_OBJ to django.utils.dates. This should read "of January" and "on January" in english . * Add a custom extension in django.utils.dateformat: Q for MONTHS_POS, V for MONTHS_OBJ. Any available letter should do. That's all. There is a=still an issue about the format 'S' that adds the ordinals (1st, 2nd etc) but I don't know how other languages deal with this. I can submit a patch for this... garcia_marc orestis dates month 0 0 0 0 0 0
Powered by Datasette · Queries took 1.151ms