Bogey Jammer
Bogey Jammer

Reputation: 718

Django: What's the purpose of the LANGUAGE_CODE setting?

I've made a prototype site with working i18n text translations. But whatever I put in LANGUAGE_CODE setting in the settings.py, I see no effect on my pages. It seems to be always overridden by the locale finder middleware. The django's documentation does not give much explanations. What's the true purpose of this setting?

Upvotes: 3

Views: 1108

Answers (1)

Jure C.
Jure C.

Reputation: 3080

If you do a

grep -R LANGUAGE_CODE * 

over the django code, you can see where it's being used internally.

Quick glance tells me that it's a fallback locale if other means can't be used. If they can, they also usually set the LANGUAGE_CODE so other parts of the code can access it.

Upvotes: 6

Related Questions