Can django's i18n internationalization middleware offer language selection by URL?
|Reported by:||benoitcsirois||Owned by:||nobody|
|Severity:||Keywords:||i18n internationalization seo languages urls|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Django's current internationalization framework allows only the project's default language to be indexed by search engines, because a single URL is only indexed in one language in the search engine.
Would it be possible to implement a www.example.com/LANG/app type of URL handling in django's internationalization framework?
I have been using something similar, which someone published (forget where I found it, see attached file for middleware), but it breaks django's reverse url lookup, unless I specify urls with a (?P<lang>(\w\w)) at the beginning... thus resulting in a useless "lang" parameter passed-on to views.
Can a simpler, more integrated solution be implemented?