Opened 3 years ago

Closed 3 years ago

#18365 closed Cleanup/optimization (fixed)

remind in the "set languages redirection view" that the i18n template context processor should be set

Reported by: anonymous Owned by: nickmartini
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Here https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#the-set-language-redirect-view remind that 'django.core.context_processors.i18n' should be in the TEMPLATE_CONTEXT_PROCESSORS tuple in the settings.py.

I've just lost one hour in front of a cryptic error message (google didn't helped) and i18n works perfectly without this template context processor set.

Change History (4)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization

Indeed, this is necessary to put LANGUAGES in the context.

comment:2 Changed 3 years ago by nickmartini

  • Owner changed from nobody to nickmartini
  • Status changed from new to assigned

comment:3 Changed 3 years ago by nickmartini

  • Has patch set

Submitted pull request, needs review https://github.com/django/django/pull/345

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In [b7d3b057f32ed6aa7ee0941e1f0dec9d3e9223a3]:

Fixed #18365 - Added a reminder of the context processor required for the set_language view.

Thanks Nick Martini for the patch.

Note: See TracTickets for help on using tickets.
Back to Top