Skip to content

Glossary support #8

Open
Open

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.

Activity

  1. added
    enhancement
    on May 10, 2024
  2. globalpai commented on Aug 16, 2024

    @globalpai

    One could leverage the Glossary for DNT (Do Not Translate), but it's worth considering having DNT as a separate list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions