LinguaCode / linguacode-translator

2 side conversion: code to text; text to code.

Home Page:https://linguacode.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

2 side conversion: code to text; text to code.

https://linguacode.me

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%