INL / corpus-frontend

BlackLab Frontend, a feature-rich corpus search interface for BlackLab.
16 stars 7 forks source link

Default (locale-independent) translation? #534

Open jan-niestadt opened 2 weeks ago

jan-niestadt commented 2 weeks ago

If you configure display names for your various fields/annotations, you need to do so in each language you want to support. E.g. for our parallel corpus of bible versions, we have this:

{
  "index": {
    "annotatedFields": {
      "contents__de_1460": "Mentelin-Bibel (NT)",
      "contents__en_1395": "Wycliffe Bible",
      "contents__nl_1360": "Hernse Bijbel",
      "contents__sv_1541": "Vasabibeln"
    }
  }
}

Now you either have to put identical copies of this section in each locale file, or translate the section to each language specifically. If we had a default.json translation file that was used as a fallback in case none of the locale files had a translation, you could put this section there once and it would be used regardless of chosen language.

KCMertens commented 1 week ago

It works this way already if you put the fields in the en-us.json file, but it would be better to allow a default.json or something as well.

jan-niestadt commented 1 week ago

Ah, hadn't realized that, nice. Documenting that (if it isn't already) is probably enough then.