1

I have a app in django, which I need to implement i18n, should be easy in django. but my problem here is, I cannot use the HttpSession to store the user language! so my solution is, I got add to all URL the language as parameter! is there any easy why to do it?! or some API for django?!

I saw this however it is just available in django 1.4 which is still in Dev!

Arthur Neves
  • 11,840
  • 8
  • 60
  • 73

1 Answers1

2

Try using transurlvania, I've just used it in 2 of my websites over past two few weeks and it seems very nice to work with and is quite similar to what docs say is in trunk now, so my guess is it will be easy to move to 1.4 in the future.

It supports, quote:

Language-in-Path - a replacement for Django's language cookie that makes URLs language-specific by storing the language code in the URL path.

More on transurlvania here and on StackOverflow.

Community
  • 1
  • 1
Davor Lucic
  • 28,970
  • 8
  • 66
  • 76
  • do u know if I can use this with django-multilingual : http://code.google.com/p/django-multilingual/ – Arthur Neves Jun 24 '11 at 18:55
  • 2
    I would suggest using [Datatrans](https://github.com/citylive/django-datatrans), great tool for translating and does not require any changed to existing models. But, since I have never used `django-multilingual` I can't say for sure that it works great, but I do think it should. – Davor Lucic Jun 24 '11 at 19:04
  • ok. how about this Datatrans. can I use it together transurlvania? or i dont need both?! – Arthur Neves Jun 24 '11 at 19:16
  • No, you don't need both, but they work great together. Thing with datatrans is that you don't need to edit existing models, and transurlvania makes having language in path or in domain a breeze. I strongly suggest trying out both of them if you have time. – Davor Lucic Jun 24 '11 at 19:22