2
1

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.

textra apiを使って英日翻訳

Posted at

#作業手順#
2. PHPを動かすためにWebサーバを用意する。(MAMPなら便利)
4. API一覧のURLをクリックすればパラメータとコードが見られる。ここでは英日翻訳APIを試すので、『みんなの : 英語 - 日本語』を使う。

3. サンプルコードをhtdocs以下に配置する。

4. 以下のパラメータに与えを入れる

define("NAME", "");

define("KEY", "");

define("SECRET", "");

define("URL", "");

  1. oauth-phpライブラリもhtdocs以下に設置し、ソースの中身を書き換える。
    include("oauth-php/library/OAuthStore.php");
    include("oauth-php/library/OAuthRequester.php");
  2. Default原文("Hello World!!")は翻訳されない場合があるようで、違う英語に置き換えましょう。

    "text" => "Hello World!!",

    "text" => "I live in Japan.",

(終わり)
2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?