ucd-library / fin

FIN (Fedora IN docker) Base Services
MIT License
0 stars 0 forks source link

Create a label service to translate language abbreviations to full language descriptions #88

Open UcDust opened 3 months ago

UcDust commented 3 months ago

In DAMS, we need to translate abbreviated language codes (ie fr) that collections are available in to the full language description (ie French). This issue has some details.

This registry can be used to make the translation. This is also the registry the linked data platform uses.

UcDust commented 3 months ago

@EricNebeker This issue will be for some work @jrmerz is helping with. For the collections, you'll want to define something like:

"schema:inLanguage": [
    {"@id": "https://www.iana.org/assignments/language-subtag-registry#fr"},
    {"@id": "https://www.iana.org/assignments/language-subtag-registry#la"}
  ]

// or

"schema:inLanguage": {"@id": "https://www.iana.org/assignments/language-subtag-registry#fr"}

If collections are imported this way, the label service will create a name attribute (in addition to @id) and assign it the full description that's matched in the registry.