1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GitHub PagesとGASを経由したGoogle翻訳で翻訳ツールを作る

1
Posted at

翻訳APIの用意

基本的にはこちらの記事の通り。
Google翻訳APIを無料で作る方法

一点だけ上の記事と異なる注意点

アクセス可能なユーザを「全ユーザー」ではなく「Anyone, even anonymous」にしないとCORSでひっかかる。

translate.png

Webページの準備

GitHub Pages用のレポジトリを作って、htmlとかcssとかjsを用意
参照: GitHub Pagesで静的サイトを簡単に作る

APIを叩く時は、XMLHttpRequestを使うよりも、fetchを使った方が楽っぽいです。👍 まだXMLHttpRequestを使ってるの? fetchのすすめ

現在動かしてみているページ

https://paper-support-tool.github.io/
英語論文の読み書きを楽にするために作ったもの。

  • PDFから文章をコピーした時に便利な機能がいくつかある。
  • Grammarlyと兼用するとさらに幸せになれる。
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?