3👍
✅
You may want to have a look at Transurlvania as it allows you to map a domain to a language:
MULTILANG_LANGUAGE_DOMAINS = {
'en': ('www.example-en.com', 'English Site'),
'fr': ('www.example-fr.com', 'French Site')
}
5👍
Why don’t you write your onw tiny middleware class that you add after the LocaleMiddleware, that simply adds the language, if no language has been identified yet based on the rules that you have explained here in that thread.
0👍
You could use a separate site for each domain, and use a view mixin or a middleware to check the site id and react appropriately.
- [Django]-Should I use JWT or Sessions for my eCommerce website?
- [Django]-Unable to use curl to get a token with Django OAuth Toolkit
- [Django]-Django-CMS AppHooks with conflicting urls?
- [Django]-When and how to validate data with Django REST Framework
- [Django]-How to convert normal numbers into arabic numbers in django
Source:stackexchange.com