0
votes

I have a website which has 2 languages. Everything works perfect but i just need to set the default language for every user. Users can change the language if they want but i want to serve the website in default language. I've made some search and found that maybe i can do it with django.views.i18n.set_language() but couldn't find how. Any help would be great. Thanks.

1
Do you have USE_I18N = True in your settings file?kbdev
@kbdev yes, i do.Engin

1 Answers

0
votes

In your settings file, set LANGUAGE_CODE to the desired language. As documented at How Django discovers language preference, Django selects this as the default language when no preference has been set in the user session or browser settings.