0.1.8 • Published 4 years ago

sdl-translate v0.1.8

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

sdl-translate

Text translations using SDL Language Cloud.
See also: https://www.npmjs.com/package/sdl-translate-server

Can translate full HTML documents now from ^0.0.6.

Usage

var sdlTranslate = require("sdl-translate");
var translate = new sdlTranslate({key: "<your_api_key_goes_here>"});
translate.languages().then(function(languages) {
  console.log(languages);
}).catch(function(error) {
  console.log(error);
});
translate.translate("This is a test line.", "eng", "swe").then(function(text) {
  console.log(text);
}).catch(function(error) {
  console.log(error);
});

Usage with sdl-translate-server

var sdlTranslate = require("sdl-translate");
var translate = new sdlTranslate({
  server: {
    use: true,
    link: "https://<your_server_name>",
    authorization: "<your_server_authorization_key>"
  }
});
translate.languages().then(function(languages) {
  console.log(languages);
}).catch(function(error) {
  console.log(error);
});
translate.translate("This is a test line.", "eng", "swe").then(function(text) {
  console.log(text);
}).catch(function(error) {
  console.log(error);
});

For API key:
https://languagecloud.sdl.com/translation-toolkit/login?origin=xing&product=onlineeditor

0.1.8: Fixed a bug not allowing to translate all text nodes for HTML content.

0.1.8

4 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago