views:

21

answers:

1
LANGUAGE_CODE = 'ru-RU'

USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = False

{{ post.date_added|date:"b" }} gives "окт" in templates. If I set USE_I18N = False then it gives oct as it should be. Is this a bug ? How can I solve this problem ? Are there any possibilities to disable USE_I18N in template (in part of it) ?

A: 

Django relies on strftime heavily, but : http://docs.python.org/library/datetime.html Directive Meaning Notes %a Locale’s abbreviated weekday name.
%A Locale’s full weekday name.
%b Locale’s abbreviated month name.
%B Locale’s full month name.

So when USE_I18N=True the month name is converted into russian because it's locale dependent. Will write my own template tag probably :(

Alexander A.Sosnovskiy