2011年3月8日火曜日

Google Virtual Keyboardの使い方(Getting Started) その1

前回から、Google Virtual Keyboardのドキュメントの内、
Overviewページを翻訳してみました。

今回も、多言語文字入力を可能にする、

Google Virtual Keyboard API
のドキュメントを翻訳してみます。


APIの利用方法を説明する、
Getting Started(スタートガイド)
ページです。

Google Virtual Keyboard - Getting Started
Google Virtual Keyboard 開発者ガイド


Virtual Keyboard APIで、ウェブページのテキストフィールドやテキストエリアのためのオンスクリーンのキーボードを利用することができます。このキーボードは、慣れ親しんだキーボードレイアウトを使って、他の言語をタイプすることを可能にします。

バーチャルキーボードとは何でしょう?バーチャルキーボードは、あるキーボードレイアウトを別のレイアウトに変換するために利用されるオンスクリーンインターフェイスです。APIを利用するには幾つかの方法があります。
・外国語用のキーボード上で自身の使用する言語のタイプを可能にします。旅行先、自分の使用する言語が公用語ではない国での使用などです。
・キーボードを使用することができないユーザーに、マウスクリックでタイプする、よりアクセスしやすいオンスクリーンキーボードを提供します。
・多言語を使用するユーザーに、アルファベットまたはその他の文字間での素早い入力切替を可能にします。

Table of Contents
Introduction
 Scope
 Browser compatibility
 Audience
 The "Hello World" of Virtual Keyboard
Getting Started
 Signing up for an API key
 Loading the JavaScript API
Using the API
 Creating a new keyboard instance
 Getting the active keyboard layout
 Returning the language of the active keyboard layout
 Setting the keyboard layout
 Showing or hiding th keyboard
 Detecting if the keyboard is visible
 Calling the onLoad handler
Layout code enum
Troubleshooting

Introduction(はじめに)
この開発者ガイドは、Google Virtual Keyboard APIを利用するための基本モデルを提供します。これはAPIで設定可能なJavaScriptコンポーネントの詳細な説明に沿っています。このガイドで、ウェブページやアプリケーションでバーチャルキーボードを利用可能になります。

Scope(説明する内容)
このドキュメントは、Virtual Keyboard APIに特有の機能とプロパティの使い方を説明しています。

Browser compatibility(利用可能なブラウザ)
Virtual Keyboard API は、Firefox 1.5以上、IE6以上、Safari、Opera9以上、Chromeをサポートしています。

Audience(対象となる方)
このドキュメントは、ウェブページやアプリケーションにGoogle Virtual Keyboardの機能を付加したい開発者向けです。


The "Hello World" of Virtual Keyboard(最初のサンプル、Hello World)

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="https://www.google.com/jsapi=INSERT-YOUR-KEY"></script>
    <script type="text/javascript">

      // Load the Google Onscreen Keyboard API
      google.load("elements", "1", {
          packages: "keyboard"
      });

      function onLoad() {
        var kbd = new google.elements.keyboard.Keyboard(
          [google.elements.keyboard.LayoutCode.RUSSIAN],
          ['t1']);
      }

      google.setOnLoadCallback(onLoad);
    </script>
  </head>
  <body>
  Type in Russian<br/>
  <textarea id="t1" style="width: 600px; height: 200px;"></textarea>
  </body>
</html>

このサンプルを実行するには、code playgroundを参照してください。
 

続く。 


インストール不要・無料のKaede翻訳ツール
http://kaedetrans.appspot.com/

0 件のコメント:

コメントを投稿