/apps-script-konjac-api

Self-Hosting Free Google Translate API by Google Apps Script

Primary LanguageJavaScript

konjac-api

Self-Hosting Free Google Translate API by Google Apps Script

Translation API

This API calls LanguageApp.translate(text, sourceLanguage, targetLanguage)

POST https://script.google.com/macros/s/${your-script-id}/exec

Input

Name Type Description
text string Required.
target string Required. A list of language codes is available here
source string If it is set to the empty string, the source language code will be auto-detected
type string Supported values are 'text' (default) and 'html'
curl -L -d "text=konjac&target=ja" https://script.google.com/macros/s/${your-script-id}/exec

Response

{
  "data": {
    "translatedText": "コンニャク"
  }
}

Examples