public Dictionary <string, ParagraphUnit> ReadTtx(string ttxFile) { SegmentsImported = 0; SegmentsNotImported = 0; var ttx = new TTX.Processor(); Dictionary <string, ParagraphUnit> paragraphUnits; try { ttx.Progress += counter_Progress; paragraphUnits = ttx.ReadTtx(ttxFile); SegmentsImported = ttx.SegmentsImported; SegmentsNotImported = ttx.SegmentsNotImported; } catch (Exception ex) { throw ex; } finally { ttx.Progress -= counter_Progress; } return(paragraphUnits); }
public void WriteTtx(string fileName, string sdlxliffFilePath, Dictionary <string, Dictionary <string, ParagraphUnit> > fileParagraphUnits, CultureInfo sourceCulture, CultureInfo targetCulture) { SegmentsExported = 0; SegmentsNotExported = 0; var ttx = new TTX.Processor(); ttx.WriteTtx(fileName, sdlxliffFilePath, fileParagraphUnits, sourceCulture, targetCulture); SegmentsExported = ttx.SegmentsExported; SegmentsNotExported = ttx.SegmentsNotExported; }