https://github.com/dev1an/meteor-ms-translate
Microsoft Translate for Meteor
https://github.com/dev1an/meteor-ms-translate
Last synced: over 1 year ago
JSON representation
Microsoft Translate for Meteor
- Host: GitHub
- URL: https://github.com/dev1an/meteor-ms-translate
- Owner: Dev1an
- Created: 2015-06-03T13:16:48.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-03T16:59:46.000Z (about 11 years ago)
- Last Synced: 2025-01-21T13:09:29.692Z (over 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Installation
Add the atmosphere package to your app: `meteor add devian:mstranslate`
Use the followng `settings.json` file with your app:
```js
{
...
"msTranslator": {
"id": "",
"secret": ""
}
...
}
```
# Usage
## Translation
To translate some text, use the `Microsoft.translate` function. It takes 2 arguments:
- `text`: a String you want to translate
- `language`: the language-code of the language you want to translate the text to
### Example:
```js
Microsoft.translate("Hello world", "nl")
```
returns
```js
'Hallo mensen'
```
## Language detection
`Microsoft.detect(text)`
- `text`: some text you want to get the language-code from