vtk-translate
v2.0.0
Published
Translate api from google
Downloads
3
Readme
Requirement
- Javascript ES module
Features
- Translate language
Installation
npm install --save vtk-translate
Usage
import translate from "vtk-translate";
translate("Hello world!").then(function (response) {
console.log(response);
});
// Specific language
translate("Hello world!", { from: "en", to: "vi" }).then(function (response) {
console.log(response);
});
API
translate(text, options)
text
Type: [string] The text to be translated
options
Type: [object]
[from]
Type: [string] Default: [auto] From language
[to]
Type: [string] Default: [vi] To language