An open API service indexing awesome lists of open source software.

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

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