Skip to content

Google Translate

Description

Google 翻譯

Resources

POST /v1/google/translate

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Request Body Parameters

Name Type Description
content string 內容
languages string
語系
ALLOWED VALUES:
  • JAPANESE: 日語
  • KOREAN: 韓語
  • ENGLISH: 英語
  • FRENCH: 法語
  • INDONESIAN: 印尼文
  • THAI: 泰文
  • VIETNAMESE: 越南文
  • SPANISH: 西班牙文
  • GERMAN: 德文
  • RUSSIAN: 俄文

Request Example

{
    "content": "有什麼好吃的料理嗎?",
    "languages": "JAPANESE, ENGLISH"
}

Response Body Parameters

Name Type Description
translate_result Translate Result 翻譯結果

Response Body Parameters - Translate Result

Name Type Description
japanese string 日語(optional)
korean string 韓語(optional)
english string 英語(optional)
french string 法語(optional)
indonesian string 印尼文(optional)
thai string 泰文(optional)
vietnamese string 越南文(optional)
spanish string 西班牙文(optional)
german string 德文(optional)
russian string 俄文(optional)

Response Example - Success

Status-Code: 200

{
    "translate_result": {
        "japanese": "何か美味しい食べ物はありますか?",
        "english": "Do you have any delicious food?"
    }
}

Response Example - Translate Failed

Status-Code: 400

{
    "message": "翻譯失敗,請求 google 翻譯超時"
}