2

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

user1746291
  • 303
  • 1
  • 5
  • 14

1 Answers1

1

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.

Community
  • 1
  • 1
Thomas Schwärzl
  • 8,381
  • 6
  • 40
  • 63
  • I tried to modify this middleware but I am unable to solve my problem so please can u tell me how can i do that?? **thanks** – user1746291 Oct 25 '12 at 12:31