Exemplo n.º 1
0
        private static void WriteToTmx(string[] texts, string[] res, string from, string to)
        {
            TranslationMemory TM = new TranslationMemory();
            TranslationUnit   TU = new TranslationUnit();

            TM.sourceLangID = from;
            TM.targetLangID = to;
            for (int i = 0; i < texts.Length; i++)
            {
                TU.strSource = texts[i];
                TU.strTarget = res[i];
                TU.user      = "******";
                TU.status    = TUStatus.good;
                TM.Add(TU);
            }
            TM.WriteToTmx("DocumentTranslator.TMX");
            return;
        }