internetarchive/openlibrary

List languages in correct alphabetical order

Open

#11962 opened on Feb 28, 2026

View on GitHub
 (17 comments) (1 reaction) (1 assignee)Python (4,626 stars) (1,172 forks)batch import
Good First IssueLead: @RayBBNeeds: HelpNeeds: ResponseNeeds: Review AssigneePriority: 4Type: Bug

Description

Problem

The list of languages at https://openlibrary.org/languages?sort=name doesn't display in alphabetical order correctly

The list sorts alphabetically, but differentiates between uppercase and lowercase charaters.

The list sorts alphabetically, but lists characters with diacritics at the end.

Reproducing the bug

  1. Go to https://openlibrary.org/languages?sort=name and change the website language to Croatian (or any other foreign language)
  2. Scroll down the list to see the problems shown in my above images
  • Expected behavior: the language list should display in a correct alphabetic order
  • Actual behavior: the language list doesn't display in a correct alphabetic order

Context

  • Browser: Firefox 148.0 (aarch64)
  • OS: Mac OS26.3 (25D125)
  • Logged in (Y/N): N
  • Environment (prod, dev, local): ???

Breakdown

Requirements Checklist

  • Sort the language list in correct alphabatical order for all website languages:
  • Don't differentiate between uppercase and lowercase charaters
  • Sort languages correctly using character decomposition. For instance, in Croatian the base charater is C. Characters Č and Ć are composite charaters of C, and should therefore appear after C, and not at the end of the list. Same is true for other composite characters.

Related to issue #11961

Stakeholders

Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Contributor guide