openedx / openedx/frontend-app-authoring

Replace custom language names list with standard Intl DisplayNames API

Open
#2,332 5 comments 0 reactions 1 assignee View on GitHub

@ahtesham-quraish is already working on this.

Since Aug 8, 2025.

code health good first issue help wanted
Dominant language
TypeScript
Stars
17
Forks
218
Avg merge
9d 20h
Merged PRs (30d)
20

Description

In src/editors/data/constants/video.js, there is an object called videoTranscriptLanguages which holds a mapping from language code to language name.

This should be removed and instead we should just use the standard Intl.DisplayNames API which is built into every browser and does the same thing, without us needing to maintain the list of languages or their translations.

const languageNames = new Intl.DisplayNames(["en"], { type: "language" });
languageNames.of("pt-BR");
// Result: 'Brazilian Portuguese'

const languageNames = new Intl.DisplayNames(["pt-BR"], { type: "language" });
languageNames.of("pt-BR");
// Result: 'português (Brasil)'

It's also available in react-intl as formatDisplayName but you might as well use the native API directly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.