1.0.12 • Published 4 years ago
text-translator v1.0.12
#Language Translator
Installation
npm i text-translatorConfiguration
Currently AWS Translate API is supported for this package. In future, there will be more packages like this.
You need to set environment variables:
AWS_ACCESS_KEY=<your-aws-access-key>
AWS_SECRET_KEY=<your-aws-secret-key>
REGION=<your-aws-region> (default is us-east-1)Basic Usage
import { LanguageTranslateService } from 'text-translator';
const translate = new LanguageTranslateService();
translate.translate('<h1>Hi, how are you</h1>', 'fr', TextType.HTML, TranslateProvider.AWS).then(translatedText => {
console.log('Translated Text', translatedText);
});The text type supports Plain text, Html and markdown text types.
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.12
4 years ago
0.0.17
7 years ago
0.0.16
7 years ago
0.0.15
7 years ago
0.0.14
7 years ago
0.0.13
7 years ago
0.0.12
7 years ago
0.0.1
7 years ago