how do i get a domain to trigger i18n in django
So over the last few weeks I have been preparing a few different languages for our platform and was wondering how you go about getting a do开发者_如何学Cmain name to activate a certain language?
For instance, if I have site with 5 languages.
Swedish, English, Norwegian, Danish and Finnish
and one of my users visit the www.domainname.se I want it to trigger the swedish part.
Any tips?
With httpd, just use RequestHeader
to frob the Accept-Language
header for the virtual host, since Django looks at it to discover language preference.
RequestHeader append Accept-Language sv-se
精彩评论