Hi every one
We have developed an application which creates new Trados projects based on a project template. There is a file-based Translation Memory with some fields in that template, and we want to set the field's update.
Project is creating with this code:
Language[] trgLangs = new[] { new Language(. . .) };
var info = new ProjectInfo
{
Name = . . .,
DueDate = . . .,
LocalProjectFolder = . . .,
SourceLanguage = . . .,
TargetLanguages = trgLangs
};
var template = new ProjectTemplateReference(templateFilePath); // template with a Translation Memory with direction to trgLangs[0]'s language
var newProject = new FileBasedProject(info, template);
As directed by SDL API help: "Translation Memory Fields Update", first we had to find the file path of the Translation Memory and then get the definition of its fields.
I used the below code to retrieve the setting of Translation Memory files, but it returns no Translation Memory:
TranslationProviderConfiguration tmConfig = newProject.GetTranslationProviderConfiguration(trgLangs[0]);
// tmConfig.Entries.Count = 0 <--Problem
It seems like C# code do not see Translation Memorie added with template.
Please help us how to set Translation Memory Fields Update in my special scenario.
Thank you.