mirror of
https://github.com/juancarlospaco/nim-tinyslation
synced 2026-01-03 01:24:50 +00:00
No description
| .github | ||
| downloads | ||
| src | ||
| .gitignore | ||
| build.nims | ||
| LICENSE | ||
| README.md | ||
| temp.png | ||
| translation.nimble | ||
nim-tinyslation
- Text string translation from free online crowdsourced API.
Tinyslation a tiny translation. Sync and Async support (MultiSync).
No API Key required. Works with and without SSL
-d:ssl. No Auth required.
Use
>>> import translation
>>> echo MMT().tinyslation("white cat", to="es") # Sync.
"gato blanco"
>>>
>>> proc async_translation {.async.} = echo await AsyncMMT().tinyslation("black dog", to="es")
>>> wait_for async_translation() # Async.
"perro negro"
Install
nimble install translation
Requisites
Documentation
tinyslation()
Description:
Text string translation from free online crowdsourced API.
The proc does not accept char only string.
Arguments:
textA text to translate,stringtype, required.toA target language to translate on ISO 2-char language code,stringtype, eg."en"or"es", required.fromA source language to translate on ISO 2-char language code,stringtype, eg."en"or"es", optional, defaults to"en", required.timeoutA Timeout,int8type, optional.
Returns: A translated text string, string type.
