-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Browser language lookup is incorrectly using ISO 639-1 instead of BCP 47 #12003
Copy link
Copy link
Open
Labels
Lead: @cdriniIssues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: ResponseIssues which require feedback from leadIssues which require feedback from leadPriority: 3Issues that we can consider at our leisure. [managed]Issues that we can consider at our leisure. [managed]Type: BugSomething isn't working. [managed]Something isn't working. [managed]
Metadata
Metadata
Assignees
Labels
Lead: @cdriniIssues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: ResponseIssues which require feedback from leadIssues which require feedback from leadPriority: 3Issues that we can consider at our leisure. [managed]Issues that we can consider at our leisure. [managed]Type: BugSomething isn't working. [managed]Something isn't working. [managed]
Problem
As I mentioned in #5997 (comment), the language tags sent by browsers are based on BCP 47, not ISO 639-1, so doing ISO 639-1 based lookups is incorrect. This will not work for the over 300 MARC languages which don't have ISO 639-1 codes, disenfranchising those users.
In Wikidata, these can be found using the property P305 "IETF Language Tag". For languages which have ISO 639-1 codes, these will overlap, but most languages do not have an ISO 639-1 code.
Reproducing the bug
Context
Breakdown
Implementation Details (for maintainers)
Requirements Checklist
Related files
Stakeholders
Instructions for Contributors