Is it possible, with the Javascript API, to get the list of languages set up in a Prismic repo in Settings > Translations & locales (Multi-languages – /settings/multi-languages/)?
It would be awesome if the language name, code, and icon were available.
When you query the API for the Document object or the Response object, you get all the available languages in two fields: lang and alternate_languages. You can get only language code through this like fr-fr or en-gb.
Yes, I'm aware of the Document and Response Object, but I'm wondering if there's a query to get the list of languages that are set up in the Settings area of the Dashboard/Repo. I just want a list of the languages set up in the repo, not the languages set for each document. Does that make sense?
This is not possible directly for the moment, there is no direct query possible for getting results. Although, there is a workaround like you can get all the languages of all the documents in JSON, using the following query: