lustdante
lustdante

Reputation: 493

Django i18n without language prefix

Django documentation dictates i18n_patterns to implement i18n.

I'm hoping to accomplish this without using language prefix.

Django: change app language programmatically (without /i18n/setlang/ view)

This suggests something similar but I'd like to accomplish it using request session.

The user will be able to change language using GET request.

How do you implement MiddleWare and View to accomplish this?

Thank you.

Upvotes: 0

Views: 247

Answers (1)

Albert Tugushev
Albert Tugushev

Reputation: 1702

To set language via HTTP GET parameter try this snippet: http://djangosnippets.org/snippets/1948/

Upvotes: 1

Related Questions