Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.77 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.77 KB

Build Status Coverage Status Code Climate Dependency Status devDependency Status License

linguacode-translator

Description

linguacode-translator is a library which allows to translate text to code and the opposite.

How to install

yarn

yarn add https://github.com/linguacode/linguacode-translator --save

npm

npm install https://github.com/linguacode/linguacode-translator --save

Usage

var translator = require('linguacode-translator');

var text = 'տպել("բարեւ")';

var textToCode = translator.toCode(text, 'hy'); //@output("բարեւ")
var textToCodeToText = translator.toText(textToCode, 'hy'); //'տպել("բարեւ")'
console.log(text == textToCodeToText) //true

var translation = translator.translate(textToCode, 'hy', 'ru'); //'вывести("բարեւ")'

License

translator is licensed under MIT.