문제

I am using the concept of multiple languages in my project, and everything works fine.

But i am having some queries about my url.

When i am using this url www.asd.com/reg/?lang=es, then it display the data in spanish form.

But if i am using this url www.asd.com/reg/lang=es, then it does not display data in spanish.

The difference between two url is "?" , so can anybody suggest me some way with which I can accomplish my task without this "?"

Thanks

도움이 되었습니까?

해결책

It's not possible to post variables without the ? in your URL. (more informations here)

If you want to manage it without the GET-Parameter (?lang) you need to rewrite the middleware I've posted to you. Also you need to modify your urls.py.

All you then may achieve is www.asd.com/reg/lang/es or http://es.asd.com/reg if you're familiar with subdomaining.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top