Is there a way to loop through the project translation memories, using GetTranslationProviderConfiguration(), and then disable certain Main/Project TranslationProviderItems?
Is there a way to loop through the project translation memories, using GetTranslationProviderConfiguration(), and then disable certain Main/Project TranslationProviderItems?
Hi Samuel,
Code is untested, but try something like this (project is a FileBasedProject):
var config = project.GetTranslationProviderConfiguration();
foreach (var entry in config.Entries)
{
if (....)
{
entry.MainTranslationProvider.Enabled = false;
}
foreach (var projTM in entry.ProjectTranslationMemories)
{
if (...)
{
projTM.Enabled = false;
}
}
}
project.UpdateTranslationProviderConfiguration(config);