On Tue, Mar 2, 2010 at 11:19 AM, jul <juj...@gmail.com> wrote:
> I have a multilingual site and I'd like to get some date in the
> current language. With date.strftime, I get the date in english
> only...
> The language is set by "/i18n/setlang/".
> How can I do that?

For simple formatting, you could just do what the "date" template filter does:

from django.utils.dateformat import format
format(value, format_string)

This uses a slightly different format-string syntax than strftime, but
it is locale-aware and so will translate month and day names for you
in the process.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to