Table of Contents

Method TranslateAsync

Namespace
LMKit.Translation
Assembly
LM-Kit.NET.dll

TranslateAsync(string, Language, CancellationToken)

Converts plain text into a specified target language while maintaining the original layout.

public Task<string> TranslateAsync(string text, Language language, CancellationToken cancellationToken = default)

Parameters

text string

The text to translate.

language Language

A member of the Language enumeration specifying the target language code for the translation.

cancellationToken CancellationToken

Optional. A CancellationToken for handling cancellation requests.

Returns

Task<string>

The translated text.

Remarks

This method is designed to handle text of any size, ensuring that the structure and formatting of the original content are preserved in the translation.