Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

689 B
Raw Blame
namespace Filee.Engines.Translation;

public interface ITranslationService
{
    /// <summary>
    /// Translates a single text segment from <paramref name="fromLang"/> (or auto-detect) to <paramref name="toLang"/>.
    /// </summary>
    Task<string> TranslateTextAsync(string text, string toLang, string fromLang = "auto", CancellationToken cancellationToken = default);

    /// <summary>
    /// Translates a batch of text segments, preserving ordering and any embedded inline formatting tags.
    /// </summary>
    Task<IReadOnlyList<string>> TranslateBatchAsync(IReadOnlyList<string> texts, string toLang, string fromLang = "auto", CancellationToken cancellationToken = default);
}