On Apr 21, 12:04 am, Marc Garcia <garcia.m...@gmail.com> wrote: > just to warm up for my Google Summer of Code on i18n, I want to start > a discussion on to simple things...
I'm glad to see something is going to finally get done in i18n and l10n, which mostly sucks right now. > First thing is where to place l10n settings. In my opinion it should > be under the existing directories for every locale, so for example > django/conf/locale/en/ and we should use gettext format as for the > messages. > > May be something like > > django/conf/locale/en/LC_SETTINGS/django.po > > would be ok. What do you think? I'd prefer keeping it at settings.py, maybe as a dictionary of languages: LANGUAGE_SETTINGS = { # languages not in this dictionary use default settings 'es': { 'decimal_point': ',', 'date_format': '%d/%m/%Y', 'datetime_format': '%H:%M:%S %d/%m/%Y', 'currency_symbol': u'€', 'currency_position': 'suffix', }, } If language settings get too long then people can extract them to language_settings.py and import at settings.py. Alternative syntax: LANGUAGE_SETTINGS_ES = { 'decimal_point': ',', 'date_format': '%d/%m/%Y', 'datetime_format': '%H:%M:%S %d/%m/%Y', 'currency_symbol': u'€', 'currency_position': 'suffix', } If settings.LANGUAGE_SETTINGS_(LANGUAGE_CODE) doesn't exist then defaults are used. PD: I wrote this before reading Russell's response, I'll just leave this here for future discussion. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---