Show / Hide Table of Contents

Class YandexTranslateService

Inheritance
System.Object
YandexTranslateService
Namespace: CommonBotLibrary.Services
Assembly: cs.temp.dll.dll
Syntax
public class YandexTranslateService : ITranslationService

Constructors

YandexTranslateService(String)

Constructs an implementation that uses Yandex Translate.

Declaration
public YandexTranslateService(string apiKey = null)
Parameters
Type Name Description
System.String apiKey

Defaults to API key in Tokens if null.

Methods

TranslateAsync(String, YandexLanguage, YandexLanguage)

Uses Yandex Translate to translate text to another language.

Declaration
public Task<YandexResult> TranslateAsync(string text, YandexLanguage target, YandexLanguage source = null)
Parameters
Type Name Description
System.String text

The text to translate.

YandexLanguage target

The language to translate to.

YandexLanguage source

The language to translate from. Autodetected if null.

Returns
Type Description
Task<YandexResult>
See Also
TOS
Back to top © 2017 - Borja Canseco