Skip to content

Conversation

DaniFornons
Copy link
Contributor

This PR fixes outdated references in the documentation and docstring of django.views.i18n.set_language().
Since Django 4.0, the view no longer stores the chosen language in the session. It only uses the cookie defined by the LANGUAGE_COOKIE_NAME setting.
The docstring and docs have been updated accordingly to avoid confusion.

Thanks to Samriddha Kumar Tripathi and kid_alan_ on Discord for the report

Trac ticket number

ticket-36636

Branch description

Remove outdated references to session-based language storage in the set_language() view docstring and in the i18n documentation.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

@DaniFornons DaniFornons force-pushed the ticket-36636-set_language-docs branch from d42aead to 8b893f3 Compare October 3, 2025 12:31
Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up. 👍 Just some teeny suggested edits.

@jacobtylerwalls jacobtylerwalls changed the title Fixed #36636 -- Updated set_language() docs and docstring to remove session-based storage reference. Fixed #36636 -- Removed session-based storage reference from set_language() docs and docstring. Oct 3, 2025
@DaniFornons DaniFornons force-pushed the ticket-36636-set_language-docs branch from 8b893f3 to a8e498b Compare October 3, 2025 16:29
@jacobtylerwalls jacobtylerwalls force-pushed the ticket-36636-set_language-docs branch from a8e498b to 0f700ab Compare October 3, 2025 17:06
@jacobtylerwalls jacobtylerwalls merged commit 2514857 into django:main Oct 3, 2025
46 of 47 checks passed
@jacobtylerwalls
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants