Google 翻訳: Translation API Basic, 翻訳 (Google Translate: Translation API Basic, Translate)
Google翻訳(API v2)を用いて機械翻訳します。翻訳先言語(ターゲット言語)の指定は必須ですが、翻訳元言語(ソース言語)の指定は任意です(自動検出されます)。基本的には、ニューラルマシン翻訳モデル(NMT)が適用されますが、一部の言語ではフレーズベースマシン翻訳モデル(PBMT)が適用されます。
Download
2021-03-09 (C) Questetra, Inc. (MIT License)
https://support.questetra.com/ja/addons/google-translate-translation-api-basic-translate/
Addonファイルのインポートは Professional でのみご利用いただけます
Notes
- Google Cloud Translation Basic (Translation API v2) で機械翻訳されます。
- 月間使用量に基づいて料金が請求されます。
- https://cloud.google.com/translate?hl=ja#section-5
- Google Cloud Translation Advanced (Translation API v3) と異なり “用語集” 等には対応していません。
- プレーンテキストまたはHTMLフォーマットの文字列を翻訳します。(HTMLタグは翻訳されません)
- あらかじめ “Google Cloud Console” にて、自動通信(API通信)に関する設定を行います。
- Google Cloud プロジェクトを選択(必要に応じて作成)します。
- プロジェクトにて “Cloud Translation API” を[有効化]します。
- 認証情報から[OAuth 2.0 クライアント]を作成し、”Client ID” および “Client Secret” をメモします。
- “OAuth 同意画面” の設定例
- アプリ名: “TransForBpms”
- “認証情報” の設定例 (OAuth 2.0 クライアント)
- アプリケーションの種類: “ウェブアプリケーション”
- 名前: “Bpms-Trans”
- 承認済みのJavaScript生成元: “”
- 承認済みのリダイレクトURI: “
https://s.questetra.net/oauth2callback
“
- “OAuth 同意画面” の設定例
- ドキュメント: https://cloud.google.com/translate/docs/setup?hl=ja
- ワークフロー基盤の[HTTP認証]にてGoogleへの自動通信設定を入力し、Refreshトークンを取得します。
- “HTTP認証” (OAuth2)の設定例
- Name:
- “
GoogleTrans
“
- “
- Authorization Endpoint URL
- “
https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force
“
- “
- Token Endpoint URL
- “
https://accounts.google.com/o/oauth2/token
“
- “
- Scope
- “
https://www.googleapis.com/auth/cloud-translation
“
- “
- Client ID
- (メモしたクライアントID)
- Consumer Secret
- (メモしたクライアントシークレット)
- Name:
- “HTTP認証” (OAuth2)の設定例
Capture

Appendix
- Cloud Translation API (v2) でサポートされている言語コード – 100言語以上
- 英語: “en”, スペイン語: “es”, フランス語: “fr”, ドイツ語: “de”, ポルトガル語: “pt”
- 日本語: “ja”, 韓国語: “ko”, 簡体中国語: “zh-CN”, 繁体中国語: “zh-TW”, 等
- https://cloud.google.com/translate/docs/languages?hl=ja
- https://cloud.google.com/translate/docs/basic/discovering-supported-languages?hl=ja
- 再翻訳テストA (Retranslation)
- On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: “Stay Hungry. Stay Foolish.” It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you. Stay Hungry. Stay Foolish.
- 最終号の裏表紙には、早朝の田舎道の写真がありました。冒険心があれば、ヒッチハイクをしているかもしれません。その下には、「空腹のまま。愚かのまま」という言葉がありました。彼らがサインオフしたとき、それは彼らの別れのメッセージでした。空腹のまま。愚かでいなさい。そして、私はいつも自分自身のためにそれを望んでいました。そして今、あなたが卒業して新たに始めるとき、私はあなたのためにそれを望みます。空腹のまま。愚かでいなさい。
- On the back cover of the final issue was a photo of a country road in the early morning. If you are adventurous, you may be hitchhiking. Below that was the phrase, “Stay hungry. Stay stupid.” It was their farewell message when they signed off. Stay hungry. Be stupid. And I always wanted it for myself. And now, when you graduate and start anew, I want it for you. Stay hungry. Be stupid.
- 再翻訳テストB (Retranslation)
- I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. I have a dream today!
- いつの日か、4人の小さな子供たちが肌の色ではなく性格の内容で判断される国に住むことを夢見ています。今日は夢があります!
- One day, I dream of four little children living in a country that is judged by their personality rather than their skin color. I have a dream today!
- 再翻訳テストC (Retranslation)
- 吾輩は猫である。名前はまだ無い。どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。吾輩はここで始めて人間というものを見た。しかもあとで聞くとそれは書生という人間中で一番獰悪(どうあく)な種族であったそうだ。
- I am a cat. As yet I have no name. I’ve no idea where I was born. All I remember is that I was miaowing in a dampish dark place when, for the first time, I saw a human being. This human being, I heard afterwards, was a member of the most ferocious human species; a shosei, one of those students who, in return for board and lodging, perform small chores about the house.
- 吾輩は猫である。まだ名前はありません。どこで生まれたのかわかりません。私が覚えているのは、初めて人間を見たとき、私は湿った暗い場所で呟いていたということだけです。この人間は、後で聞いたように、最も凶暴な人間の種のメンバーでした。宿舎と宿泊の見返りに家の雑用をする学生の一人、正生。