Skip to content

juancarlospaco/nim-tinyslation

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

Text string translation from free online crowdsourced API. Tinyslation a tiny translation. Nim package.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages