Opened 4 years ago
Closed 4 years ago
#31795 closed New feature (wontfix)
Allow overriding regional subtags convertion to lowercase
Reported by: | Théo Chevalier | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Claude Paroz | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
Our organization uses IETF BCP 47 locale codes with ISO 3166 regional subtags (e.g. en-US
), and unfortunately to_language()
converts the regional subtag to lowercase, en-us
. This doesn’t work with our localization toolchain, and we’ve noticed we have hacky code in each of our Django-based project to make it work.
Would it be possible to allow overriding that logic in a cleaner way?
Thanks!
Change History (1)
comment:1 by , 4 years ago
Cc: | added |
---|---|
Component: | Uncategorized → Internationalization |
Resolution: | → wontfix |
Status: | new → closed |
Type: | Uncategorized → New feature |
Note:
See TracTickets
for help on using tickets.
Language codes in IETF format are used in the HTTP
Accept-Language
header which is case-insensitive. It's documented that the language part is always in lowercase.Unfortunately, I don't see a way to customize this behavior without a big refactoring or new settings.