PapagoTranslator
This is a translation REST API applied to Naver Papago. It is a REST API that outputs input text as translated text in other languages (English, Chinese).
A framework to use Papago API by Naver in Swift.
Installation
CocoaPods:
pod 'PapagoTranslator'
Manual:
Copy PapagoTranslator.swift to your project.
Initialization
First of all you have to generate id & secret to use Naver services in the console. And then use the following code:
PapagoTranslator.init(id: "", secret: "")
Using
let pt = PapagoTranslator.init(id: "", secret: "")
pt.run("hello", "en", "ko") { (text, err) in
guard let text = text, err == nil else {
print(err?.localizedDescription)
return
}
print(text)
}
License
PapagoTranslator is available under the MIT license. See the LICENSE file for more info.