views:

764

answers:

3

I am trying to use django-multilingual and setup it properly. But what I found is that everything is clear for django-multilingual except a template usage example.

I just started to use django and I don't know, maybe because of this reason, I cannot figure out how to switch between languages on template side.

Is there any example that you can give or any 'more' clear source/documentation about this?

+2  A: 

switching locale in django is a simple post do this view

http://docs.djangoproject.com/en/dev/topics/i18n/#the-set-language-redirect-view

in templates you can access the language value with request.LANGUAGE_CODE

zalew
+3  A: 

You might also want to try django-localeurl app. It enables users to switch locales storing current locale in the URL. It also provides several useful template tags for switching and displaying available locales.

excieve
A: 

Using django-localeurl I need to mantain the language selected in next views. Is it possibile? How?

Every time it falls back to the default...

Alessandro Ronchi
You can take a look at here: http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/#the-set-language-redirect-view
israkir