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 Mariusz Felisiak, 4 years ago

Cc: Claude Paroz added
Component: UncategorizedInternationalization
Resolution: wontfix
Status: newclosed
Type: UncategorizedNew feature

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.

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