Currently, the code uses hardcoded languages which means that most of them are missing. This could be avoided by fetching the available language versions through the API. Here is an example request:
https://en.wikipedia.org/w/api.php?action=sitematrix&format=json&formatversion=2
With the information in there, you can populate all fields used in languages.ts except for the flag (but flags are not great anyway).
Currently, the code uses hardcoded languages which means that most of them are missing. This could be avoided by fetching the available language versions through the API. Here is an example request:
https://en.wikipedia.org/w/api.php?action=sitematrix&format=json&formatversion=2
With the information in there, you can populate all fields used in languages.ts except for the flag (but flags are not great anyway).