No description
Find a file
Juan Carlos a04c02b923 0.20.0
2019-06-06 15:13:03 -03:00
.github Create FUNDING.yml 2019-05-26 02:42:06 -03:00
downloads Add Async and Sync support using MultiSync. Add builds! 2018-07-23 02:00:47 -03:00
src 0.20.0 2019-06-06 15:11:58 -03:00
.gitignore Initial commit 2018-05-02 19:45:45 -03:00
build.nims Add Async and Sync support using MultiSync. Add builds! 2018-07-23 02:00:47 -03:00
LICENSE 0.20.0 2019-06-06 15:13:03 -03:00
README.md Update Doc 2018-07-23 02:30:28 -03:00
temp.png Add Async and Sync support using MultiSync. Add builds! 2018-07-23 02:12:12 -03:00
translation.nimble Merge branch 'master' of https://github.com/juancarlospaco/nim-tinyslation 2019-06-06 15:12:12 -03:00

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.

screenshot

screenshot

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:

  • text A text to translate, string type, required.
  • to A target language to translate on ISO 2-char language code, string type, eg. "en" or "es", required.
  • from A source language to translate on ISO 2-char language code, string type, eg. "en" or "es", optional, defaults to "en", required.
  • timeout A Timeout, int8 type, optional.

Returns: A translated text string, string type.