I want to change the language when the user introduce in the url the locale, something like this http://example.com/es/, http://example.com/es/article-name, http://example.com/en/.
how can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Checkout django-locale-url.
It provides a middleware that does exactly what you are asking for, so you don’t need to check for the language in urls.py