Opened 5 years ago
Closed 5 years ago
#30675 closed New feature (needsinfo)
Ignore ACCEPT_LANGUAGE header only on i18n prefixed url patterns
Reported by: | Janez Kranjc | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the current version of django the localization middleware ignores the accept language header if any i18n prefixed url pattern exist. It should only ignore it if the active url pattern is prefixed.
This would allow the following usage:
- Have i18n prefixed urls for a website
- Allow accept language header for api views which are not prefixed
I am willing to write a patch for this if there it would be merged to django eventually.
Change History (2)
comment:1 by , 5 years ago
Version: | 2.2 → master |
---|
comment:2 by , 5 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Hi Jenez,
Thanks for the report. I kind of see the use-case here but changes here are non-trivial, so I think we need to flesh out the proposal, probably on the DevelopersMailingList, before moving forwards. (This is a delicate area and there's lots of expertise available there.)
Some thoughts...
get_language_from_path()
and..._request()
etc. Are these related?The need here is just to flesh out what's involved. I hope that makes sense.