1.0.12 • Published 2 years ago
text-translator v1.0.12
#Language Translator
Installation
npm i text-translator
Configuration
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
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.12
2 years ago
0.0.17
5 years ago
0.0.16
5 years ago
0.0.15
5 years ago
0.0.14
5 years ago
0.0.13
5 years ago
0.0.12
5 years ago
0.0.1
5 years ago