translate method

translate

Translates a presentation to the specified language using AI (synchronous version).

def translate(self, presentation, language):
    ...
ParameterTypeDescription
presentationIPresentationTarget presentation
languagestrTarget language

Remarks

The example below uses the default AsposeAIWebClient, which is created by the parameterless SlidesAIAgent.#ctor 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 Aspose.Slides.AI.SlidesAIAgent.#ctor(Aspose.Slides.A constructor. Available implementations include:

Exceptions

ExceptionDescription
RuntimeError(Proxy error(ArgumentNullException))Presentation instance is not provided
RuntimeError(Proxy error(ArgumentException))Language value can’t be None or empty

See Also