I'm looking for a way to detect user language. I set my default language as 'en_US'
, and I translated my site for 'pt_BR'
. How can I switch the language and show 'pt_BR' version for Brazilians and 'en_US' for the rest of the world?
I read these documentation links:
https://docs.djangoproject.com/en/dev/topics/http/sessions/
https://docs.djangoproject.com/en/1.7/topics/i18n/translation/
I believe that maybe I'll have to take this information from user cookies or browser preferences, but how can I do this?
Furthermore, how can I test different languages? I have to change my browser language? OS language? Use a proxy?