Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-multilingual and switching between languages on template side

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?

like image 907
israkir Avatar asked Sep 22 '09 13:09

israkir


1 Answers

switching locale in django is a simple post do this view

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

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

like image 138
zalew Avatar answered Sep 28 '22 06:09

zalew