Django naturaltime Localization error
Posted
by
Edwin Lunando
on Stack Overflow
See other posts from Stack Overflow
or by Edwin Lunando
Published on 2014-06-06T11:45:40Z
Indexed on
2014/06/06
15:26 UTC
Read the original article
Hit count: 273
My language ID is 'id'. I used localized humanize library for my Django template tags and use the naturaltime, but the translation is partially wrong. The now translated to sekarang is right. second to detik. minute to menit, but when it comes to date, week, or months, the word is not translated to my language. It keeps printing date, week, and months.
Here are my Django configuration
TIME_ZONE = 'Asia/Jakarta'
LANGUAGE_CODE = 'id'
SITE_ID = 1
USE_I18N = True
USE_L10N = True
USE_TZ = True
Here how I used the naturaltime template tags.
<time class="discussion__info__item">{{ object.created|naturaltime }}</time>
Do I forgot something? Thank you.
© Stack Overflow or respective owner