https://github.com/animatedcreativity/sdl-translate-server
Server for text translations using SDL Language Cloud. Translations are stored in a database for future usage to save costs.
https://github.com/animatedcreativity/sdl-translate-server
Last synced: 4 months ago
JSON representation
Server for text translations using SDL Language Cloud. Translations are stored in a database for future usage to save costs.
- Host: GitHub
- URL: https://github.com/animatedcreativity/sdl-translate-server
- Owner: animatedcreativity
- Created: 2019-07-24T06:56:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T14:48:44.000Z (over 6 years ago)
- Last Synced: 2025-09-14T14:20:04.035Z (9 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sdl-translate-server
Server for text translations using SDL Language Cloud. Translations are stored in a database for future usage to save costs.
See also: https://www.npmjs.com/package/sdl-translate
Can translate full HTML documents now from ^0.0.3.
Made for personal use only.
For commercial use, please contact SDL itself.
### Configuration
```
exports = module.exports = function() {
return {
authorization: "", // Lowercase
expressHost: "127.0.0.1",
expressPort: 3000,
database: "database/translations",
endpoint: "/translate",
key: "", // Get an API key here: https://languagecloud.sdl.com/translation-toolkit/login?origin=xing&product=onlineeditor
cdn: { // dbpouch CDN, if needed.
use: false,
email: "",
apiKey: "",
domain: "",
folder: ""
}
}
};
```
Add a file named `sdl-translate-server.js` in parent folder or in the project itself with above configuration.
### API Requests
Translate
```
curl \
-d '{"text": "This is a test line.", "from": "eng", "to": "swe"}' \
-H "content-type: application/json" \
-H "authorization: " \
https:///translate; echo
```
Languages
```
curl \
-H "authorization: " \
https:///languages; echo
```
OR, use `sdl-translate` module to make API requests: https://www.npmjs.com/package/sdl-translate
Happy coding!