Event TranslationProgress
- Namespace
- LMKit.Translation
- Assembly
- LM-Kit.NET.dll
Occurs after each chunk has been translated, reporting the current chunk index and total chunk count.
public event EventHandler<TranslationProgressEventArgs> TranslationProgress
Returns
- EventHandler<TranslationProgressEventArgs>
- Occurs after each chunk has been translated, reporting the current chunk index and total chunk count.
Examples
translator.TranslationProgress += (sender, e) =>
{
double pct = (double)(e.ChunkIndex + 1) / e.TotalChunks * 100;
Console.WriteLine($"Translation progress: {pct:F0}% ({e.ChunkIndex + 1}/{e.TotalChunks})");
};
Remarks
Use this event to display a progress bar or track how much of the input has been translated. The event is raised once per chunk, after the chunk translation is complete.