pull down to refresh

Translation Plugin

This is a translation plugin for OpenAgents built with Extism Go PDK that uses the Microsoft Translator Text API via RapidAPI . The plugin takes a text input and translates it to a specified language.

Features

  • Translates text from one language (auto detect) to another using the Microsoft Translator Text API.
  • Supported Language :
CodeName
afAfrikaans
amAmharic
arArabic
asAssamese
azAzerbaijani
baBashkir
bgBulgarian
bhoBhojpuri
bnBangla
boTibetan
brxBodo
bsBosnian
caCatalan
csCzech
cyWelsh
daDanish
deGerman
doiDogri
dsbLower Sorbian
dvDivehi
elGreek
enEnglish
esSpanish
etEstonian
euBasque
faPersian
fiFinnish
filFilipino
fjFijian
foFaroese
frFrench
fr-CAFrench (Canada)
gaIrish
glGalician
gomKonkani
guGujarati
haHausa
heHebrew
hiHindi
hneChhattisgarhi
hrCroatian
hsbUpper Sorbian
htHaitian Creole
huHungarian
hyArmenian
idIndonesian
igIgbo
iktInuinnaqtun
isIcelandic
itItalian
iuInuktitut
iu-LatnInuktitut (Latin)
jaJapanese
kaGeorgian
kkKazakh
kmKhmer
kmrKurdish (Northern)
knKannada
koKorean
ksKashmiri
kuKurdish (Central)
kyKyrgyz
lnLingala
loLao
ltLithuanian
lugGanda
lvLatvian
lzhChinese (Literary)
maiMaithili
mgMalagasy
miMāori
mkMacedonian
mlMalayalam
mn-CyrlMongolian (Cyrillic)
mn-MongMongolian (Traditional)
mniManipuri
mrMarathi
msMalay
mtMaltese
mwwHmong Daw
myMyanmar (Burmese)
nbNorwegian
neNepali
nlDutch
nsoSesotho sa Leboa
nyaNyanja
orOdia
otqQuerétaro Otomi
paPunjabi
plPolish
prsDari
psPashto
ptPortuguese (Brazil)
pt-PTPortuguese (Portugal)
roRomanian
ruRussian
runRundi
rwKinyarwanda
sdSindhi
siSinhala
skSlovak
slSlovenian
smSamoan
snShona
soSomali
sqAlbanian
sr-CyrlSerbian (Cyrillic)
sr-LatnSerbian (Latin)
stSesotho
svSwedish
swSwahili
taTamil
teTelugu
thThai
tiTigrinya
tkTurkmen
tlh-LatnKlingon (Latin)
tlh-PiqdKlingon (pIqaD)
tnSetswana
toTongan
trTurkish
ttTatar
tyTahitian
ugUyghur
ukUkrainian
urUrdu
uzUzbek (Latin)
viVietnamese
xhXhosa
yoYoruba
yuaYucatec Maya
yueCantonese (Traditional)
zh-HansChinese Simplified
zh-HantChinese Traditional
zuZulu

Prerequisites

  • Go 1.16 or higher
  • A RapidAPI account
  • Microsoft Translator Text API key from RapidAPI

Installation

  1. Clone the repository:
    git clone https://github.com/AndrewLWZZ/Translation-Plugin.git cd Translation-Plugin
  2. Install dependencies:
    go get -u github.com/extism/go-pdk

Usage

  1. Set your RapidAPI key in the API_KEY variable in the main.go file:
    var API_KEY string = "YOUR_API_KEY"
  2. Build the plugin:
    tinygo build -o plugin.wasm -target wasi main.go
  3. Run the plugin using Extism-CLI:
    extism call plugin.wasm run --input='{"text": "YOUR_TEXT?", "to": "LANGUAGE_CODE"}' --wasi --allow-host='*.rapidapi.com'

Example

API Reference

The plugin uses the Microsoft Translator Text API. Refer to the API documentation for details on supported languages and additional features.

Acknowledgements

this territory is moderated
Excellent, thank you!
This qualifies for the bounty, please DM me @OpenAgentsInc on X a bitcoin address or email me chris@openagents.com
reply
That's sweet, thanks! I’ve already sent the details via DM on X.
reply
Awesome, thank you! Will review shortly
reply
I forgot to add the Lightning address. here's mine AndrewLWZZ@stacker.news
reply
💪🏾
reply