HelloAOLab / bible-api

The Bible as an easy-to-use API.
https://bible.helloao.org
MIT License
21 stars 3 forks source link

Not clear how to derive the language from the 3 letters code #6

Closed mtgred closed 2 months ago

mtgred commented 3 months ago

The documentation for the translation endpoint says language is The RFC 5646 letter language tag that the translation is primarily in. https://bible.helloao.org/docs/reference/#code-example

The language code returned by https://bible.helloao.org/api/available_translations.json are 3 letters codes (eg. "eng") which don't match the RFC 5646 tags (eg. "en" or "en-GB") https://gist.github.com/msikma/8912e62ed866778ff8cd

It seems to be closer to ISO 639 tags (https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes). But many of the language codes returned by the translations endpoint are not in the ISO 639 list (eg. "ikk" or "ixl")

KallynGowdy commented 2 months ago

Ah that is a documentation error. It should note that they are ISO 639-3 tags.

Also that list from Wikipedia doesn't list all 3 character language tags. I would recommend using the ISO 639 code tables for looking up information on a particular tag.

mtgred commented 2 months ago

Thanks for the clarification and the complete language code list.

Would it possible to add the language name to the translation endpoint?

KallynGowdy commented 2 months ago

This is fixed in v1.2.0.

mtgred commented 2 months ago

Awesome, thanks for the update.