Add translation API

This commit is contained in:
Ilya Laktyushin
2022-01-28 21:00:56 +03:00
parent b618777883
commit 4c36a2172f
7 changed files with 66 additions and 13 deletions

View File

@@ -313,5 +313,9 @@ public extension TelegramEngine {
public func messageReactionList(message: EngineMessage, reaction: String?) -> EngineMessageReactionListContext {
return EngineMessageReactionListContext(account: self.account, message: message, reaction: reaction)
}
public func translate(text: String, fromLang: String?, toLang: String) -> Signal<String?, NoError> {
return _internal_translate(network: self.account.network, text: text, fromLang: fromLang, toLang: toLang)
}
}
}