Add TMs under each language pair and not under 'All Language Pairs'

Hello,

With the API I would like to add the TMs under each language combination and not under the 'All Language Pairs'

Trados Studio navigation pane showing expanded 'Language Pairs' with 'All Language Pairs' and two specific pairs: 'English (United States) to German' and 'English (United States) to Italian'.

Any idea how to do this?

I've seen the following question but it got no replies in 3 years Slight smile

https://community.sdl.com/developers-more/developers/language-developers/f/sdk_qa/8281/adding-tms-on-the-language-pair-level

Thanks,

Pavlos



Generated Image Alt-Text
[edited by: Trados AI at 1:22 PM (GMT 0) on 5 Mar 2024]
Parents
  • Hello , ,

    Sorry for the late response.

    We did what you provided but the TM we would like to add with the API is added under 'All Language pairs" and not under the 'English > Italian' language combination. See image below.

    Screenshot showing Trados Studio interface with a Translation Memory (TM) added under 'All Language Pairs' instead of the specified 'English > Italian' language combination.

    Here is our code:

    TranslationProviderConfiguration translationProviderConfiguration = fileBasedProject.GetTranslationProviderConfiguration();

    TranslationProviderCascadeEntry translationProviderCascadeEntry = new TranslationProviderCascadeEntry(translationMemoryFilePath,true, true,false);

    translationProviderConfiguration.Entries.Add(translationProviderCascadeEntry);

    fileBasedProject.UpdateTranslationProviderConfiguration(new Language(CultureInfo.GetCultureInfo(targetLanguage)) , translationProviderConfiguration);

    Is there anything we miss?



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

    Sorry for the late response.

    We did what you provided but the TM we would like to add with the API is added under 'All Language pairs" and not under the 'English > Italian' language combination. See image below.

    Screenshot showing Trados Studio interface with a Translation Memory (TM) added under 'All Language Pairs' instead of the specified 'English > Italian' language combination.

    Here is our code:

    TranslationProviderConfiguration translationProviderConfiguration = fileBasedProject.GetTranslationProviderConfiguration();

    TranslationProviderCascadeEntry translationProviderCascadeEntry = new TranslationProviderCascadeEntry(translationMemoryFilePath,true, true,false);

    translationProviderConfiguration.Entries.Add(translationProviderCascadeEntry);

    fileBasedProject.UpdateTranslationProviderConfiguration(new Language(CultureInfo.GetCultureInfo(targetLanguage)) , translationProviderConfiguration);

    Is there anything we miss?



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