translation

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


Keywords
translation, tinyslation, api, strings, minimalism, nim, nim-lang, traduction
License
LGPL-3.0
Install
nimble install translation@#v0.1.0

Documentation

nim-tinyslation

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

screenshot

Use

>>> import translation
>>> echo tinyslation("white cat", to="es")  
"gato blanco"
>>>

Install

nimble install tinyslation

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.
  • fallback_value A fallback value to return when it fails, string type, optional, if omitted and failed to translate then the same string will be returned, required.

Returns: A translated text string, string type.