I am using Django 1.3 in my project and switching away from the javascript i18n function to localeurl.
Really handy although I am stuck with my get_absolute_url().
Everytime I try and call up a page it defaults to the default language, even if I have selected another one.
is there a workaround for get_absolute_url()
to incorprate the existing language code?
Try whith this:
from django.utils.translation import get_language
get_language()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.