On 12-8-2012 15:53, Gour wrote: > what is the recommended way to set different language in Django admin > (e.g. English) than the one in front-end (e.g. native one)?
As you can see in the documentation [1], there's five methods by which one can select the language once you've added LocaleMiddleware: - The first method enables the user to select the language by altering the URL. Naturally, this can be facilitated by the site by providing 'change language' buttons. - Two and three are controlled by the site, but can also be made user-selectable. - Four is fully user controllable by going into the browser options. - Five is site-wide and should remain that way. Altering project settings at runtime can have unforeseen side effects. Of these options, number one is the least intrusive, but you'll have to figure out how to handle the redirect if the language code is not part of the URL. Second best is the session cookie, though I don't really see a simple way to properly set it back if one leaves the admin site (which isn't the same as logging out). [1] <https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#how-django-discovers-language-preference> -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.