Skip to content

Glossary support #8

@domenic

Description

@domenic

Some translation APIs provide support for a glossary of specialized terms, e.g. here is Google Cloud Translation's documentation or DeepL's.

I think it would look something like this:

const translator = await translation.createTranslator({
  sourceLanguage: "ja",
  targetLanguage: "en",
  glossary: {
    "巨人": "Titan",
    "調査兵団": "Survey Corps",
    "超大型巨人": "Colossal Titan",
    "リヴァイ兵長": "Captain Levi",
    "ウォール・シーナ": "Wall Sina"
  }
});

The example given here is translating something about the popular manga/anime Attack on Titan, using the official translations that are widely used. Note that they can definitely differ from the default translations, e.g. Google Translate gives "giant", "Research Corps", and "Super-sized giants" for the first three.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions