Skip to content

LeGmask/jstranslate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsTranslate

This is the official repo for the jsTranslate node package. This package permit to call the free google translate api easly by giving the lang of the text, the desired lang for the output and the text who is needed to be translated. For the lang definition you could use lang name (like French, German, English), or you could use ISO 639-1 & ISO 639-2, It will be automaticly parsed to ISO 639-1 because google translate api use this one.

How use jstranslate ?

  • first install jstranslate in your project by running the command : npm add --save @legmask/jsTranslate

  • secondly you must import jsTranslate :

const jsTranslate = require("@legmask/jstranslate");
  • After that you could simply call the jsTranslate module like that (for a working exemple see exemple.js):
return jsTranslate(SourceLang, LangOutput, TextToTranslate).then(function (
  response
) {
  console.log(response);
});

:warn: the text in imput should'nt have any point, I will fix it soon !

If you want to help for this project, simply open an issue for reporting bug or feature request, also you could simply open a pull request 😄 !

About

This npm package permit to call the free google translate api easly.

Resources

License

Stars

Watchers

Forks

Packages

No packages published