TranslateAsync

SlidesAIAgent.TranslateAsync method

Translates a presentation to the specified language using AI.

public Task TranslateAsync(IPresentation presentation, string language)
ParameterTypeDescription
presentationIPresentationTarget presentation
languageStringTarget language

Exceptions

exceptioncondition
ArgumentNullExceptionPresentation instance is not provided
ArgumentExceptionLanguage value can’t be null or empty

Remarks

The example below uses the default AsposeAIWebClient, which is created by the parameterless SlidesAIAgent constructor and connects to Aspose’s own LLM. To use a different AI provider, supply your own LLM, or customize the connection (for example, by providing your own HttpClient), pass an IAIWebClient implementation to the SlidesAIAgent constructor. Available implementations include:

See Also