views:

112

answers:

4

How i can get the current language of my web in a model or in the admin?

A: 

You can read the system's locale for language information.

advait
A: 
from django.conf import settings
settings.LANGUAGE_CODE
luc
+3  A: 

Functions of particular interest are django.utils.translation.get_language() which returns the language used in the current thread.

http://docs.djangoproject.com/en/1.1/howto/i18n/#using-translations-outside-views-and-templates

micha480
A: 

Or you can also get this in your views

request.LANGUAGE_CODE
Neoman