Skip to content

FvckSh1t/translat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

translat

Translation using just page-fetching

Imortant

While using languages like Chinese, all inputs are reguarded as sentences, so they are probably capitalized.

Usage

npm install translat
var translat = require('translat'),
	translator = translat.create({
		from: 'en', to: 'zh-CN'
	});
translator.get('I love you', function(err, result){
	console.log(result);	// 我爱你
});
// dynamically switching languages
translator.defaults({
	from: 'fr', to: 'en'
}).get("Je t'aime", function(err, result){
	console.log(result);	// I love you
});

Testing

  1. Make sure that you have mocha installed globally.

    npm install -g mocha
  2. Download the package from the repository.

  3. Run from inside.

    cd translat
    npm test

About

Translation no Nodejs, using just page-fetching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published