Question

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?

Was it helpful?

Solution

Try whith this:

from django.utils.translation import get_language
get_language()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top