Reputation: 1249
Hi i am using a variable `in my template file which gives me a current month value in english
{{currentMonth}}
how can i convert this into spanish language
Upvotes: 0
Views: 2153
Reputation: 9568
You will need to have a date
passed to your template from the view. Then to get the current month you need to do
{{ mydate|date:"F" }}
This will give you the month name i.e January using template tags and filters
To get it in Spanish, enable Spanish by enabling internationalization and creating localization strings for Spanish. You can even use the humanize
template tag which has localizations available in Spanin
Upvotes: 1