Possible to use Template for creating File Based Translation Memory?

Does the API support creating new translation memories from a template, like the "Create from" option in the UI?

Parents
  • Hello

    I do not know if there is built in function to do this, bu tit is extremly easy to write function to do this:

    public void create(string file, FileBasedTranslationMemory prevMemory)
            {
                FileBasedTranslationMemory tm = new FileBasedTranslationMemory(file, "", prevMemory.LanguageDirection.SourceLanguage, prevMemory.LanguageDirection.TargetLanguage, prevMemory.FuzzyIndexes, prevMemory.Recognizers);
                tm.FieldDefinitions.AddRange(prevMemory.FieldDefinitions);
                tm.Save();
                
            }

Reply
  • Hello

    I do not know if there is built in function to do this, bu tit is extremly easy to write function to do this:

    public void create(string file, FileBasedTranslationMemory prevMemory)
            {
                FileBasedTranslationMemory tm = new FileBasedTranslationMemory(file, "", prevMemory.LanguageDirection.SourceLanguage, prevMemory.LanguageDirection.TargetLanguage, prevMemory.FuzzyIndexes, prevMemory.Recognizers);
                tm.FieldDefinitions.AddRange(prevMemory.FieldDefinitions);
                tm.Save();
                
            }

Children