Language regions are not provided on Terminology provider

Hi,

I am implementing a Terminology provider for Trados via the SDK.

Now, let's say that I am creating a project in Trados with Swiss German (deu-ch) as destination language.

When I try to search with the terminology provider I get plain German (de) as destination language.

Specifically if I try to log the Locale.NativeName in MyTerminologyProvider.Search method

public override IList<ISearchResult> Search(string text, ILanguage source, ILanguage destination, int maxResultsCount, SearchMode mode, bool targetRequired) {
  Logger.Log("NATIVE NAME: " + destination.Locale.NativeName);
  ....
}

I get:

NATIVE NAME: Deutsch

And of course the ISO code and everything is simple 'de' or 'deu'

Why is this happening? Can I get the regional code instead (deu-ch)?

Thank you

emoji
Parents
  • Hi  

    Have a look at your implementation of ITerminologyProvider, in particular at

    IList<ILanguage> GetLanguages();
    IEntry GetEntry(int id);
    IEntry GetEntry(int id, IEnumerable<ILanguage> languages);

    With GetLanguages() you tell Studio which languages your terminologyProvider does support.

    Those languages are then mapped to the project's languages, usually automatically, but if you supplied some funny languages Studio can't match you'll need to do this manually in your Project Settings->Termbases, eg:

    Screenshot showing Trados Studio Project Settings with a warning icon next to German (Germany) indicating a language mapping issue to German (Switzerland) in the selected termbase.

    These are also the languages for which Studio asks then your terminologyProvider in Search(). I.e. if your terminologyProvider has defined de-CH as the target language (like in above screenshot) then the destination parameter will be de-CH.

    You also have to make sure that the target IEntryTerms in the term(s) (IEntry) you then deliver back to Studio via GetEntry() have that same target language. A variant like de-DE instead of de-CH won't do.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:37 PM (GMT 0) on 5 Mar 2024]
Reply
  • Hi  

    Have a look at your implementation of ITerminologyProvider, in particular at

    IList<ILanguage> GetLanguages();
    IEntry GetEntry(int id);
    IEntry GetEntry(int id, IEnumerable<ILanguage> languages);

    With GetLanguages() you tell Studio which languages your terminologyProvider does support.

    Those languages are then mapped to the project's languages, usually automatically, but if you supplied some funny languages Studio can't match you'll need to do this manually in your Project Settings->Termbases, eg:

    Screenshot showing Trados Studio Project Settings with a warning icon next to German (Germany) indicating a language mapping issue to German (Switzerland) in the selected termbase.

    These are also the languages for which Studio asks then your terminologyProvider in Search(). I.e. if your terminologyProvider has defined de-CH as the target language (like in above screenshot) then the destination parameter will be de-CH.

    You also have to make sure that the target IEntryTerms in the term(s) (IEntry) you then deliver back to Studio via GetEntry() have that same target language. A variant like de-DE instead of de-CH won't do.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:37 PM (GMT 0) on 5 Mar 2024]
Children