You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2013/08/30 19:25:58 UTC
[08/36] Add edge for Spanish, French, and Chinese.
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/fileentry/fileentry.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/fileentry/fileentry.md b/docs/zh/edge/cordova/file/fileentry/fileentry.md
new file mode 100644
index 0000000..602cc7d
--- /dev/null
+++ b/docs/zh/edge/cordova/file/fileentry/fileentry.md
@@ -0,0 +1,328 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# FileEntry
+
+表示一个文件在文件系统上, [W3C 目录和系统][1]规范中定义。
+
+ [1]: http://www.w3.org/TR/file-system-api/
+
+## 属性
+
+* **isFile**: 总是 `true` 。*(布尔)*
+
+* **isDirectory**: 总是 `false` 。*(布尔)*
+
+* **名称**: 的名称 `FileEntry` ,不包括导致它的路径。*() DOMString*
+
+* **完整路径**: 绝对路径从根到 `FileEntry` 。*() DOMString*
+
+**注:**下面的属性由 W3C 规范定义,但*不是*支持:
+
+* **文件系统**: 文件系统的 `FileEntry` 驻留。*(文件系统)*
+
+## 方法
+
+* **getMetadata**: 查找有关文件的元数据。
+
+* **setMetadata**: 设置文件上的元数据。
+
+* **moveTo**: 将文件移动到一个不同的位置,在文件系统上。
+
+* **copyTo**: 将文件复制到文件系统上的不同位置。
+
+* **toURL**: 返回一个可用于查找的文件的 URL。
+
+* **删除**: 删除一个文件。
+
+* **getParent**: 查找父目录。
+
+* **createWriter**: 创建 `FileWriter` 对象,可用于向文件中写入。
+
+* **文件**: 创建 `File` 对象,其中包含文件属性。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## getMetadata
+
+查找有关文件的元数据。
+
+**参数:**
+
+* **successCallback**: 传递一个回调 `Metadata` 对象。*(函数)*
+
+* **errorCallback**: 如果错误发生在检索时将执行的回调 `Metadata` 。调用与 `FileError` 对象。*(函数)*
+
+**快速的示例**
+
+ 函数 success(metadata) {console.log ("上次修改时间:"+ metadata.modificationTime);}函数 fail(error) {alert(error.code);}/ / 请求的元数据对象的此条目 entry.getMetadata (成功、 失败) ;
+
+
+## setMetadata
+
+上一个文件集的元数据。
+
+**目前仅适用于 iOS。**
+
+* 这将设置一个文件的扩展的属性。
+
+**参数:**
+
+* **successCallback**: 当设置该元数据时执行回调。*(函数)*
+
+* **errorCallback**: 当不成功地设置该元数据时执行回调。*(函数)*
+
+* **metadataObject**: 包含元数据的键和值的对象。*(对象)*
+
+**快速的示例**
+
+ function success() {
+ console.log("The metadata was successfully set.");
+ }
+
+ function fail() {
+ alert("There was an error in setting the metadata");
+ }
+
+ // Set the metadata
+ entry.setMetadata(success, fail, { "com.apple.MobileBackup": 1});
+
+
+**iOS 怪癖**
+
+* 只有 `com.apple.MobileBackup` 支持扩展的属性。 将该值设置为 `1` ,防止文件被备份到 iCloud。 将该值设置为 `` ,重新启用该文件以将备份到 iCloud。
+
+**快速的示例**
+
+ function setFileMetadata(localFileSystem, filePath, metadataKey, metadataValue)
+ {
+ var onSetMetadataWin = function() {
+ console.log("success setting metadata")
+ }
+ var onSetMetadataFail = function() {
+ console.log("error setting metadata")
+ }
+
+ var onGetFileWin = function(parent) {
+ var data = {};
+ data[metadataKey] = metadataValue;
+ parent.setMetadata(onSetMetadataWin, onSetMetadataFail, data);
+ }
+ var onGetFileFail = function() {
+ console.log("error getting file")
+ }
+
+ var onFSWin = function(fileSystem) {
+ fileSystem.root.getFile(filePath, {create: true, exclusive: false}, onGetFileWin, onGetFileFail);
+ }
+
+ var onFSFail = function(evt) {
+ console.log(evt.target.error.code);
+ }
+
+ window.requestFileSystem(localFileSystem, 0, onFSWin, onFSFail);
+ }
+
+ setFileMetadata(LocalFileSystem.PERSISTENT, "Backups/sqlite.db", "com.apple.MobileBackup", 1);
+
+
+## moveTo
+
+在文件系统上的文件移到不同的位置。如果应用程序尝试向会导致错误:
+
+* 将文件移到其父,如果没有提供从其当前的一个不同的名称 ;
+
+* 将文件移动到被占领 ; 每个目录的路径
+
+此外,在现有文件中移动文件将尝试删除和替换该文件。
+
+**参数:**
+
+* **父**: 要将文件移到父目录。*() DirectoryEntry*
+
+* **newName**: 该文件的新名称。默认值为当前的名称如果未指定。*() DOMString*
+
+* **successCallback**: 传递新文件回调 `FileEntry` 对象。*(函数)*
+
+* **errorCallback**: 如果尝试移动文件时发生错误执行回调。调用与 `FileError` 对象。*(函数)*
+
+**快速的示例**
+
+ function success(entry) {
+ console.log("New Path: " + entry.fullPath);
+ }
+
+ function fail(error) {
+ alert(error.code);
+ }
+
+ function moveFile(entry) {
+ var parent = document.getElementById('parent').value,
+ parentName = parent.substring(parent.lastIndexOf('/')+1),
+ parentEntry = new DirectoryEntry(parentName, parent);
+
+ // move the file to a new directory and rename it
+ entry.moveTo(parentEntry, "newFile.txt", success, fail);
+ }
+
+
+## copyTo
+
+将文件复制到文件系统上的新位置。如果应用程序尝试向会导致错误:
+
+* 如果未提供从其当前的一个不同的名称,请将文件复制到其父。
+
+**参数:**
+
+* **父**: 要向其复制该文件的父目录。*() DirectoryEntry*
+
+* **newName**: 该文件的新名称。默认值为当前的名称如果未指定。*() DOMString*
+
+* **successCallback**: 传递新文件回调 `FileEntry` 对象。*(函数)*
+
+* **errorCallback**: 如果试图复制文件时发生错误执行回调。调用与 `FileError` 对象。*(函数)*
+
+**快速的示例**
+
+ function win(entry) {
+ console.log("New Path: " + entry.fullPath);
+ }
+
+ function fail(error) {
+ alert(error.code);
+ }
+
+ function copyFile(entry) {
+ var parent = document.getElementById('parent').value,
+ parentName = parent.substring(parent.lastIndexOf('/')+1),
+ parentEntry = new DirectoryEntry(parentName, parent);
+
+ // copy the file to a new directory and rename it
+ entry.copyTo(parentEntry, "file.copy", success, fail);
+ }
+
+
+## toURL
+
+返回一个可用于查找的文件的 URL。
+
+**快速的示例**
+
+ // Request the URL for this entry
+ var fileURL = entry.toURL();
+ console.log(fileURL);
+
+
+## 删除
+
+删除的文件。
+
+**参数:**
+
+* **successCallback**: 在该文件已被删除后执行的回调。不带参数调用。*(函数)*
+
+* **errorCallback**: 如果尝试删除文件时出现错误执行回调。调用与 `FileError` 对象。*(函数)*
+
+**快速的示例**
+
+ function success(entry) {
+ console.log("Removal succeeded");
+ }
+
+ function fail(error) {
+ alert('Error removing file: ' + error.code);
+ }
+
+ // remove the file
+ entry.remove(success, fail);
+
+
+## getParent
+
+查找父 `DirectoryEntry` 包含该文件。
+
+**参数:**
+
+* **successCallback**: 传递文件的父的回调 `DirectoryEntry` 。*(函数)*
+
+* **errorCallback**: 如果试图检索父时发生错误执行的回调 `DirectoryEntry` 。 调用与 `FileError` 对象。 *(函数)*
+
+**快速的示例**
+
+ function success(parent) {
+ console.log("Parent Name: " + parent.name);
+ }
+
+ function fail(error) {
+ alert(error.code);
+ }
+
+ // Get the parent DirectoryEntry
+ entry.getParent(success, fail);
+
+
+## createWriter
+
+创建 `FileWriter` 对象与所代表的文件关联`FileEntry`.
+
+**参数:**
+
+* **successCallback**: 传递一个回调 `FileWriter` 对象。*(函数)*
+
+* **errorCallback**: 如果试图创建 FileWriter 而发生错误执行回调。调用与 `FileError` 对象。*(函数)*
+
+**快速的示例**
+
+ function success(writer) {
+ writer.write("Some text to the file");
+ }
+
+ function fail(error) {
+ alert(error.code);
+ }
+
+ // create a FileWriter to write to the file
+ entry.createWriter(success, fail);
+
+
+## 文件
+
+返回 `File` 对象,它表示该文件的当前状态,这 `FileEntry` 表示。
+
+**参数:**
+
+* **successCallback**: 传递一个回调 `File` 对象。*(函数)*
+
+* **errorCallback**: 回调的执行如果发生错误时创建 `File` 对象,例如当该文件不再存在。 调用与 `FileError` 对象。 *(函数)*
+
+**快速的示例**
+
+ function success(file) {
+ console.log("File size: " + file.size);
+ }
+
+ function fail(error) {
+ alert("Unable to retrieve file properties: " + error.code);
+ }
+
+ // obtain properties of a file
+ entry.file(success, fail);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/fileerror/fileerror.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/fileerror/fileerror.md b/docs/zh/edge/cordova/file/fileerror/fileerror.md
new file mode 100644
index 0000000..19a234b
--- /dev/null
+++ b/docs/zh/edge/cordova/file/fileerror/fileerror.md
@@ -0,0 +1,42 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# FileError
+
+A `FileError` 对象时出现错误在文件 API 方法中的任何设置。
+
+## 属性
+
+* **代码**: 下面列出的预定义的错误代码之一。
+
+## 常量
+
+* `FileError.NOT_FOUND_ERR`
+* `FileError.SECURITY_ERR`
+* `FileError.ABORT_ERR`
+* `FileError.NOT_READABLE_ERR`
+* `FileError.ENCODING_ERR`
+* `FileError.NO_MODIFICATION_ALLOWED_ERR`
+* `FileError.INVALID_STATE_ERR`
+* `FileError.SYNTAX_ERR`
+* `FileError.INVALID_MODIFICATION_ERR`
+* `FileError.QUOTA_EXCEEDED_ERR`
+* `FileError.TYPE_MISMATCH_ERR`
+* `FileError.PATH_EXISTS_ERR`
+
+## 说明
+
+`FileError`对象是提供给任何文件 API 错误回调的唯一参数。 若要确定错误的类型,比较其 `code` 属性设置为任何上述的节目表。
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/fileobj/fileobj.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/fileobj/fileobj.md b/docs/zh/edge/cordova/file/fileobj/fileobj.md
new file mode 100644
index 0000000..8afdea1
--- /dev/null
+++ b/docs/zh/edge/cordova/file/fileobj/fileobj.md
@@ -0,0 +1,76 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 文件
+
+此对象包含的单个文件的属性。
+
+## 属性
+
+* **名称**: 文件的名称。*() DOMString*
+
+* **完整路径**: 包括文件名的文件的完整路径。*() DOMString*
+
+* **类型**: 文件的 mime 类型。*() DOMString*
+
+* **lastModifiedDate**: 上次修改该文件的时间。*(日期)*
+
+* **大小**: 以字节为单位的文件大小。*(长)*
+
+## 方法
+
+* **切片**: 仅选择了部分要读取的文件。
+
+## 详细信息
+
+`File`对象包含单个文件的属性。您可以获取的实例 `File` 对象通过调用 `FileEntry` 对象的 `file()` 方法。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 切片
+
+返回一个新的 `File` 对象,为其 `FileReader` 返回只有该文件的指定的部分。 负值设置为 `start` 或 `end` 测量从文件的末尾。 相对于当前切片定位的索引。 (请参阅下面的完整示例)。
+
+**参数:**
+
+* **开始**: 要阅读,具有包容性的第一个字节的索引。
+
+* **结束**: 后最后一个要读取的字节的索引。
+
+**快速的示例**
+
+ var slicedFile = file.slice(10, 30);
+
+
+**完整的示例**
+
+ var slice1 = file.slice(100, 400);
+ var slice2 = slice1.slice(20, 35);
+
+ var slice3 = file.slice(120, 135);
+ // slice2 and slice3 are equivalent.
+
+
+**支持的平台**
+
+* Android 系统
+* iOS
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/filereader/filereader.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/filereader/filereader.md b/docs/zh/edge/cordova/file/filereader/filereader.md
new file mode 100644
index 0000000..60db211
--- /dev/null
+++ b/docs/zh/edge/cordova/file/filereader/filereader.md
@@ -0,0 +1,253 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# FileReader
+
+`FileReader`允许基本文件的访问权限。
+
+## 属性
+
+* **readyState**: 一个读者的三个可能的状态,要么 `EMPTY` , `LOADING` 或`DONE`.
+
+* **结果**: 已读取文件的内容。*() DOMString*
+
+* **错误**: 包含错误的对象。*() FileError*
+
+* **onloadstart**: 读取启动时调用。*(函数)*
+
+* **onload**: 读取已成功完成时调用。*(函数)*
+
+* **onabort**: 当已中止,读取时调用。例如,通过调用 `abort()` 方法。*(函数)*
+
+* **onerror**: 当读取已失败时调用。*(函数)*
+
+* **onloadend**: 当请求已完成 (无论成功或失败) 时调用。*(函数)*
+
+**注:**以下产权不受支持:
+
+* **onprogress**: 读取该文件,报告进度的角度时称为 `progress.loaded` / `progress.total` 。*(函数)*
+
+## 方法
+
+* **中止**: 中止读取文件。
+
+* **readAsDataURL**: 读取文件并返回数据作为 base64 编码的数据的 URL。
+
+* **readAsText**: 文件中读取文本。
+
+* **readAsBinaryString**: 读取文件为二进制文件,并返回一个二进制字符串。
+
+* **readAsArrayBuffer**: 读取文件作为`ArrayBuffer`.
+
+## 详细信息
+
+`FileReader`对象提供的方法来从该设备的文件系统中读取文件。 可以读取文件,作为文本或 base64 编码的数据的字符串。 事件侦听器接收 `loadstart` , `progress` , `load` , `loadend` , `error` ,和 `abort` 的事件。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 读取数据的 URL 作为
+
+**参数:**
+
+* **文件**: 要读取的文件对象。
+
+## 快速的示例
+
+ function win(file) {
+ var reader = new FileReader();
+ reader.onloadend = function (evt) {
+ console.log("read success");
+ console.log(evt.target.result);
+ };
+ reader.readAsDataURL(file);
+ };
+
+ var fail = function (evt) {
+ console.log(error.code);
+ };
+
+ entry.file(win, fail);
+
+
+## 以文本格式阅读
+
+**参数:**
+
+* **文件**: 要读取的文件对象。
+
+* **编码**: 使用编码的文件内容的编码。默认值为 UTF8。
+
+## 快速的示例
+
+ function win(file) {
+ var reader = new FileReader();
+ reader.onloadend = function (evt) {
+ console.log("read success");
+ console.log(evt.target.result);
+ };
+ reader.readAsText(file);
+ };
+
+ var fail = function (evt) {
+ console.log(error.code);
+ };
+
+ entry.file(win, fail);
+
+
+## 中止快速示例
+
+ function win(file) {
+ var reader = new FileReader();
+ reader.onloadend = function(evt) {
+ console.log("read success");
+ console.log(evt.target.result);
+ };
+ reader.readAsText(file);
+ reader.abort();
+ };
+
+ function fail(error) {
+ console.log(error.code);
+ }
+
+ entry.file(win, fail);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>FileReader Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ }
+
+ function gotFS(fileSystem) {
+ fileSystem.root.getFile("readme.txt", null, gotFileEntry, fail);
+ }
+
+ function gotFileEntry(fileEntry) {
+ fileEntry.file(gotFile, fail);
+ }
+
+ function gotFile(file){
+ readDataUrl(file);
+ readAsText(file);
+ }
+
+ function readDataUrl(file) {
+ var reader = new FileReader();
+ reader.onloadend = function(evt) {
+ console.log("Read as data URL");
+ console.log(evt.target.result);
+ };
+ reader.readAsDataURL(file);
+ }
+
+ function readAsText(file) {
+ var reader = new FileReader();
+ reader.onloadend = function(evt) {
+ console.log("Read as text");
+ console.log(evt.target.result);
+ };
+ reader.readAsText(file);
+ }
+
+ function fail(evt) {
+ console.log(evt.target.error.code);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Read File</p>
+ </body>
+ </html>
+
+
+## iOS 的怪癖
+
+* **编码**参数不受支持,并且 UTF8 编码总是在效果。
+
+## 读取的二进制字符串
+
+目前仅支持 iOS 和 android 系统。
+
+**参数:**
+
+* **文件**: 要读取的文件对象。
+
+## 快速的示例
+
+ function win(file) {
+ var reader = new FileReader();
+ reader.onloadend = function (evt) {
+ console.log("read success");
+ console.log(evt.target.result);
+ };
+ reader.readAsBinaryString(file);
+ };
+
+ var fail = function (evt) {
+ console.log(error.code);
+ };
+
+ entry.file(win, fail);
+
+
+## 作为数组缓冲区中读取
+
+目前仅支持 iOS 和 android 系统。
+
+**参数:**
+
+* **文件**: 要读取的文件对象。
+
+## 快速的示例
+
+ function win(file) {
+ var reader = new FileReader();
+ reader.onloadend = function (evt) {
+ console.log("read success");
+ console.log(new Uint8Array(evt.target.result));
+ };
+ reader.readAsArrayBuffer(file);
+ };
+
+ var fail = function (evt) {
+ console.log(error.code);
+ };
+
+ entry.file(win, fail);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/filesystem/filesystem.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/filesystem/filesystem.md b/docs/zh/edge/cordova/file/filesystem/filesystem.md
new file mode 100644
index 0000000..12f8d3b
--- /dev/null
+++ b/docs/zh/edge/cordova/file/filesystem/filesystem.md
@@ -0,0 +1,85 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 文件系统
+
+此对象表示一个文件系统。
+
+## 属性
+
+* **名称**: 文件系统的名称。*() DOMString*
+
+* **根**: 文件系统的根目录。*() DirectoryEntry*
+
+## 详细信息
+
+`FileSystem`对象表示文件系统的信息。 文件系统的名称的公开的文件系统的列表中是唯一的。 根属性包含 `DirectoryEntry` 对象,表示文件系统的根目录。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 文件系统快速示例
+
+ function onSuccess(fileSystem) {
+ console.log(fileSystem.name);
+ console.log(fileSystem.root.name);
+ }
+
+ // request the persistent file system
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, null);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>File System Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
+ }
+
+ function onFileSystemSuccess(fileSystem) {
+ console.log(fileSystem.name);
+ console.log(fileSystem.root.name);
+ }
+
+ function fail(evt) {
+ console.log(evt.target.error.code);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>File System</p>
+ </body>
+ </html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/filetransfer/filetransfer.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/filetransfer/filetransfer.md b/docs/zh/edge/cordova/file/filetransfer/filetransfer.md
new file mode 100644
index 0000000..40e6ab0
--- /dev/null
+++ b/docs/zh/edge/cordova/file/filetransfer/filetransfer.md
@@ -0,0 +1,249 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 文件传输
+
+`FileTransfer`对象允许你上传或下载文件,服务器和客户端。
+
+## 属性
+
+* **onprogress**: 使用调用 `ProgressEvent` 每当一块新的数据传输。*(函数)*
+
+## 方法
+
+* **上传**: 将文件发送到服务器。
+
+* **下载**: 从服务器上下载文件。
+
+* **中止**: 中止正在进行转让。
+
+## 详细信息
+
+`FileTransfer`对象提供一种方法将文件上载到远程服务器使用多部分的 HTTP POST 请求。 支持 HTTP 和 HTTPS 协议。 可以通过指定可选参数 `FileUploadOptions` 对象的 `upload()` 方法。 上传成功, `FileUploadResult` 对象传递给成功回调。 如果发生错误, `FileTransferError` 对象传递到错误回调。 它也是可能的 (只在 iOS 和 Android) 从远程服务器下载文件并将其保存在设备上。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 上传
+
+**参数:**
+
+* **文件路径**: 设备上的文件的完整路径。
+
+* **服务器**: 服务器以接收该文件,由编码的 URL`encodeURI()`.
+
+* **successCallback**: 传递一个回调 `Metadata` 对象。*(函数)*
+
+* **errorCallback**: 回调的执行如果出现检索错误 `Metadata` 。调用与 `FileTransferError` 对象。*(函数)*
+
+* **选项**: 文件名称和 mimetype 等可选参数。
+
+* **trustAllHosts**: 可选参数,默认值为 `false` 。 如果设置为 `true` ,它可以接受的所有安全证书。 由于 Android 拒绝自行签署式安全证书,这非常有用。 不建议供生产使用。 在 Android 和 iOS 上受支持。 *(布尔值)*
+
+**快速的示例**
+
+ // !! Assumes variable fileURI contains a valid URI to a text file on the device
+
+ var win = function (r) {
+ console.log("Code = " + r.responseCode);
+ console.log("Response = " + r.response);
+ console.log("Sent = " + r.bytesSent);
+ }
+
+ var fail = function (error) {
+ alert("An error has occurred: Code = " + error.code);
+ console.log("upload error source " + error.source);
+ console.log("upload error target " + error.target);
+ }
+
+ var options = new FileUploadOptions();
+ options.fileKey = "file";
+ options.fileName = fileURI.substr(fileURI.lastIndexOf('/') + 1);
+ options.mimeType = "text/plain";
+
+ var params = {};
+ params.value1 = "test";
+ params.value2 = "param";
+
+ options.params = params;
+
+ var ft = new FileTransfer();
+ ft.upload(fileURI, encodeURI("http://some.server.com/upload.php"), win, fail, options);
+
+
+**完整的示例**
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+ <html>
+ <head>
+ <title>File Transfer Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ // Retrieve image file location from specified source
+ navigator.camera.getPicture(
+ uploadPhoto,
+ function(message) { alert('get picture failed'); },
+ {
+ quality : 50,
+ destinationType : navigator.camera.DestinationType.FILE_URI,
+ sourceType : navigator.camera.PictureSourceType.PHOTOLIBRARY
+ }
+ );
+ }
+
+ function uploadPhoto(imageURI) {
+ var options = new FileUploadOptions();
+ options.fileKey="file";
+ options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
+ options.mimeType="image/jpeg";
+
+ var params = {};
+ params.value1 = "test";
+ params.value2 = "param";
+
+ options.params = params;
+
+ var ft = new FileTransfer();
+ ft.upload(imageURI, encodeURI("http://some.server.com/upload.php"), win, fail, options);
+ }
+
+ function win(r) {
+ console.log("Code = " + r.responseCode);
+ console.log("Response = " + r.response);
+ console.log("Sent = " + r.bytesSent);
+ }
+
+ function fail(error) {
+ alert("An error has occurred: Code = " + error.code);
+ console.log("upload error source " + error.source);
+ console.log("upload error target " + error.target);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Upload File</p>
+ </body>
+ </html>
+
+
+**设置上传标头**
+
+在 Android 和 iOS 上受支持
+
+ function win(r) {
+ console.log("Code = " + r.responseCode);
+ console.log("Response = " + r.response);
+ console.log("Sent = " + r.bytesSent);
+ }
+
+ function fail(error) {
+ alert("An error has occurred: Code = " + error.code);
+ console.log("upload error source " + error.source);
+ console.log("upload error target " + error.target);
+ }
+
+ var uri = encodeURI("http://some.server.com/upload.php");
+
+ var options = new FileUploadOptions();
+ options.fileKey="file";
+ options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
+ options.mimeType="text/plain";
+
+ var headers={'headerParam':'headerValue'};
+
+ options.headers = headers;
+
+ var ft = new FileTransfer();
+ ft.upload(fileURI, uri, win, fail, options);
+
+
+**Android 的怪癖**
+
+设置 `chunkedMode` 选项 `false` ,防止将上载到 Nginx 服务器的问题。
+
+## 下载
+
+**参数:**
+
+* **来源**: 要下载的文件,如由编码的服务器的 URL`encodeURI()`.
+
+* **目标**: 在设备上的文件的完整路径。
+
+* **successCallback**: 传递一个回调 `FileEntry` 对象。*(函数)*
+
+* **errorCallback**: 如果错误发生在检索时将执行的回调 `Metadata` 。调用与 `FileTransferError` 对象。*(函数)*
+
+* **trustAllHosts**: 可选参数,默认值为 `false` 。 如果设置为 `true` 然后它将接受所有安全证书。 随着 Android 拒绝自我签署的安全证书,这非常有用。 不建议供生产使用。 在 Android 和 iOS 上受支持。 *(布尔值)*
+
+* **选项**: 可选参数,目前只支持标题 (如授权 (基本身份验证) 等)。
+
+**快速的示例**
+
+ // !! 假定文件路径是设备 var 文件传输的有效路径 = 新 FileTransfer() ;var uri = encodeURI ("http://some.server.com/download.php") ;fileTransfer.download (uri,文件路径,function(entry) {console.log ("下载完成:"+ entry.fullPath) ;},function(error) {console.log ("下载错误源"+ error.source) ;console.log ("下载错误目标"+ error.target) ;console.log ("上传错误代码"+ error.code) ;},false,{标题: {"授权书":"基本 dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA = ="}}) ;
+
+
+## 中止
+
+中止正在进行转让。Onerror 回调传递的错误代码为 FileTransferError.ABORT_ERR 的 FileTransferError 对象。
+
+**支持的平台**
+
+* Android 系统
+* iOS
+
+**快速的示例**
+
+ // !! 假定变量 fileURI 包含有效的 URI 到一个文本文件中,对设备无功赢 = function(r) {console.log ("不应调用。");}var 失败 = function(error) {/ / error.code = = FileTransferError.ABORT_ERR 警报 ("发生了一个错误: 代码 ="+ error.code) ;console.log ("上传错误源"+ error.source) ;console.log ("上传错误目标"+ error.target);}var 选项 = 新 FileUploadOptions() ;options.fileKey="file";options.fileName="myphoto.jpg";options.mimeType="image/jpeg";var ft = 新 FileTransfer() ;ft.upload (fileURI、 encodeURI ("http://some.server.com/upload.php")、 赢、 失败、 选项) ;ft.abort() ;
+
+
+## onprogress
+
+每当新的数据区块转移与 ProgressEvent 调用。
+
+**支持的平台**
+
+* Android 系统
+* iOS
+
+**示例**
+
+ fileTransfer.onprogress = function(progressEvent) {
+ if (progressEvent.lengthComputable) {
+ loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
+ } else {
+ loadingStatus.increment();
+ }
+ };
+ fileTransfer.download(...); // or fileTransfer.upload(...);
+
+
+**怪癖**-在这两个一个 iOS,Android 上 lengthComputable 是 `false` 使用 gzip 已编码的下载。
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/filetransfererror/filetransfererror.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/filetransfererror/filetransfererror.md b/docs/zh/edge/cordova/file/filetransfererror/filetransfererror.md
new file mode 100644
index 0000000..a04c8b0
--- /dev/null
+++ b/docs/zh/edge/cordova/file/filetransfererror/filetransfererror.md
@@ -0,0 +1,40 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# FileTransferError
+
+A `FileTransferError` 对象传递到错误回调时出现错误。
+
+## 属性
+
+* **代码**: 下面列出的预定义的错误代码之一。(人数)
+
+* **源**: 源 URI。(字符串)
+
+* **目标**: 向目标 URI。(字符串)
+
+* **http_status**: HTTP 状态代码。从 HTTP 连接收到一个响应代码时,此属性才可用。(人数)
+
+## 常量
+
+* `FileTransferError.FILE_NOT_FOUND_ERR`
+* `FileTransferError.INVALID_URL_ERR`
+* `FileTransferError.CONNECTION_ERR`
+* `FileTransferError.ABORT_ERR`
+
+## 说明
+
+`FileTransferError`上传或下载文件时出现错误时,将对象传递到错误回调。
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/fileuploadoptions/fileuploadoptions.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/fileuploadoptions/fileuploadoptions.md b/docs/zh/edge/cordova/file/fileuploadoptions/fileuploadoptions.md
new file mode 100644
index 0000000..7cdc211
--- /dev/null
+++ b/docs/zh/edge/cordova/file/fileuploadoptions/fileuploadoptions.md
@@ -0,0 +1,41 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# FileUploadOptions
+
+A `FileUploadOptions` 可以将对象传递给 `FileTransfer` 对象的 `upload()` 方法,以指定上载脚本的附加参数。
+
+## 属性
+
+* **fileKey**: 表单元素的名称。默认值为 `file` 。() DOMString
+
+* **文件名**: 要保存在服务器上的文件时使用的文件名称。默认值为 `image.jpg` 。() DOMString
+
+* **mimeType**: 要上传的数据的 mime 类型。默认值为 `image/jpeg` 。() DOMString
+
+* **params**: 一组可选的键/值对中的 HTTP 请求的传递。(对象)
+
+* **chunkedMode**: 是否要分块流式处理模式中的数据上载。默认值为 `true` 。(布尔值)
+
+* **标题**: 一张地图的标头名称/标头值。使用数组来指定多个值。(对象)
+
+## 说明
+
+A `FileUploadOptions` 可以将对象传递给 `FileTransfer` 对象的 `upload()` 方法,以指定上载脚本的附加参数。
+
+## WP7 怪癖
+
+* **chunkedMode:**: 在 WP7 上可以忽略。
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/fileuploadresult/fileuploadresult.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/fileuploadresult/fileuploadresult.md b/docs/zh/edge/cordova/file/fileuploadresult/fileuploadresult.md
new file mode 100644
index 0000000..e2745a3
--- /dev/null
+++ b/docs/zh/edge/cordova/file/fileuploadresult/fileuploadresult.md
@@ -0,0 +1,35 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# FileUploadResult
+
+A `FileUploadResult` 对象传递给成功回调的 `FileTransfer` 对象的 `upload()` 方法。
+
+## 属性
+
+* **字节发送**: 作为上载的一部分发送到服务器的字节数。(长)
+
+* **responseCode**: 由服务器返回的 HTTP 响应代码。(长)
+
+* **响应**: 由服务器返回的 HTTP 响应。() DOMString
+
+## 说明
+
+`FileUploadResult`通过成功回调的返回的对象是 `FileTransfer` 对象的 `upload()` 方法。
+
+## iOS 的怪癖
+
+* 不支持 `responseCode` 或`bytesSent`.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/filewriter/filewriter.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/filewriter/filewriter.md b/docs/zh/edge/cordova/file/filewriter/filewriter.md
new file mode 100644
index 0000000..82d8c0b
--- /dev/null
+++ b/docs/zh/edge/cordova/file/filewriter/filewriter.md
@@ -0,0 +1,230 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# FileWriter
+
+作为对象,它允许您创建和向文件中写入数据。
+
+## 属性
+
+* **readyState**: 三种可能状态之一,或者 `INIT` , `WRITING` ,或`DONE`.
+
+* **文件名**: 要写入的文件的名称。*() DOMString*
+
+* **长度**: 要写入的文件的长度。*(长)*
+
+* **位置**: 当前文件指针的位置。*(长)*
+
+* **错误**: 包含错误的对象。*() FileError*
+
+* **onwritestart**: 当写操作开始时调用。*(函数)*
+
+* **onwrite**: 当请求已成功完成时调用。*(函数)*
+
+* **onabort**: 当写操作已中止时调用。例如,通过调用 abort () 方法。*(函数)*
+
+* **onerror**: 当写操作已失败时调用。*(函数)*
+
+* **onwriteend**: 当请求已完成 (无论成功或失败) 时调用。*(函数)*
+
+下面的属性*不*受支持:
+
+* **onprogress**: 写入文件,报告进度的角度时称为 `progress.loaded` / `progress.total` 。*(函数)*
+
+## 方法
+
+* **中止**: 中止写入文件。
+
+* **寻求**: 将文件指针移到指定的字节。
+
+* **截断**: 缩短至指定长度的文件。
+
+* **写**: 将数据写入到该文件。
+
+## 详细信息
+
+`FileWriter`对象提供 utf-8 编码文件写入设备文件系统的方法。 应用程序响应 `writestart` , `progress` , `write` , `writeend` , `error` ,和 `abort` 的事件。
+
+每个 `FileWriter` 对应于一个文件中,数据可以被写入许多倍。 `FileWriter`维护的文件 `position` 和 `length` 属性,允许到 app `seek` 和 `write` 文件中的任意位置。 默认情况下, `FileWriter` 将写入到文件中,覆盖现有数据的开始。 设置可选的 `append` 到布尔 `true` 在 `FileWriter` 的构造函数来写入到文件的末尾。
+
+下面列出的所有平台都支持文本数据。 正在写入到文件系统之前文本编码为 utf-8。 一些平台还支持可以作为 ArrayBuffer 或 Blob 传递中的二进制数据。
+
+## 支持的平台
+
+文本和二进制的支持:
+
+* Android 系统
+* iOS
+
+仅限文本的支持:
+
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* Windows Phone 7 和 8
+* Windows 8
+
+## 寻求快速的示例
+
+ function win(writer) {
+ // fast forwards file pointer to end of file
+ writer.seek(writer.length);
+ };
+
+ var fail = function(evt) {
+ console.log(error.code);
+ };
+
+ entry.createWriter(win, fail);
+
+
+## 截断快速示例
+
+ function win(writer) {
+ writer.truncate(10);
+ };
+
+ var fail = function(evt) {
+ console.log(error.code);
+ };
+
+ entry.createWriter(win, fail);
+
+
+## 写快速示例
+
+ function win(writer) {
+ writer.onwrite = function(evt) {
+ console.log("write success");
+ };
+ writer.write("some sample text");
+ };
+
+ var fail = function(evt) {
+ console.log(error.code);
+ };
+
+ entry.createWriter(win, fail);
+
+
+## 二进制文件写入快速示例
+
+ function win(writer) {
+ var data = new ArrayBuffer(5),
+ dataView = new Int8Array(data);
+ for (i=0; i < 5; i++) {
+ dataView[i] = i;
+ }
+ writer.onwrite = function(evt) {
+ console.log("write success");
+ };
+ writer.write(data);
+ };
+
+ var fail = function(evt) {
+ console.log(error.code);
+ };
+
+ entry.createWriter(win, fail);
+
+
+## 追加快速示例
+
+ function win(writer) {
+ writer.onwrite = function(evt) {
+ console.log("write success");
+ };
+ writer.seek(writer.length);
+ writer.write("appended text");
+ };
+
+ var fail = function(evt) {
+ console.log(error.code);
+ };
+
+ entry.createWriter(win, fail);
+
+
+## 中止快速示例
+
+ function win(writer) {
+ writer.onwrite = function(evt) {
+ console.log("write success");
+ };
+ writer.write("some sample text");
+ writer.abort();
+ };
+
+ var fail = function(evt) {
+ console.log(error.code);
+ };
+
+ entry.createWriter(win, fail);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>FileWriter Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ }
+
+ function gotFS(fileSystem) {
+ fileSystem.root.getFile("readme.txt", {create: true, exclusive: false}, gotFileEntry, fail);
+ }
+
+ function gotFileEntry(fileEntry) {
+ fileEntry.createWriter(gotFileWriter, fail);
+ }
+
+ function gotFileWriter(writer) {
+ writer.onwriteend = function(evt) {
+ console.log("contents of file now 'some sample text'");
+ writer.truncate(11);
+ writer.onwriteend = function(evt) {
+ console.log("contents of file now 'some sample'");
+ writer.seek(4);
+ writer.write(" different text");
+ writer.onwriteend = function(evt){
+ console.log("contents of file now 'some different text'");
+ }
+ };
+ };
+ writer.write("some sample text");
+ }
+
+ function fail(error) {
+ console.log(error.code);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Write File</p>
+ </body>
+ </html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/flags/flags.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/flags/flags.md b/docs/zh/edge/cordova/file/flags/flags.md
new file mode 100644
index 0000000..69396c3
--- /dev/null
+++ b/docs/zh/edge/cordova/file/flags/flags.md
@@ -0,0 +1,39 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 标志
+
+提供的参数 `DirectoryEntry` 对象的 `getFile()` 和 `getDirectory()` 方法,查找或创建的文件和目录,分别。
+
+## 属性
+
+* **创建**: 指示应创建的文件或目录,是否它不存在。*(布尔)*
+
+* **独家**: 已由本身,但与一起使用时不起任何作用 `create` 导致文件或目录的创建,如果已经存在的目标路径失败。*(布尔)*
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 快速的示例
+
+ / / 获取数据目录,如果它不存在,则创建它。
+ dataDir = fileSystem.root.getDirectory ("数据",{创建: true});/ / 创建锁定文件,当且仅当它不存在。
+ 备份的锁定文件 = dataDir.getFile ("lockfile.txt",{创建: 真实、 独家: true}) ;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/localfilesystem/localfilesystem.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/localfilesystem/localfilesystem.md b/docs/zh/edge/cordova/file/localfilesystem/localfilesystem.md
new file mode 100644
index 0000000..4ccc5ab
--- /dev/null
+++ b/docs/zh/edge/cordova/file/localfilesystem/localfilesystem.md
@@ -0,0 +1,103 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 场合
+
+此对象提供一个获取根文件系统方法。
+
+## 方法
+
+* **requestFileSystem**: 请求的文件系统。*(函数)*
+
+* **resolveLocalFileSystemURI**: 检索 `DirectoryEntry` 或 `FileEntry` 使用当地的 URI。*(函数)*
+
+## 常量
+
+* `LocalFileSystem.PERSISTENT`: 用于存储,不应由用户代理不应用程序或用户的权限的情况下删除。
+
+* `LocalFileSystem.TEMPORARY`: 用于不能保证的持久性存储。
+
+## 详细信息
+
+`LocalFileSystem`对象的方法定义在 `window` 对象。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 请求文件系统快速示例
+
+ function onSuccess(fileSystem) {
+ console.log(fileSystem.name);
+ }
+
+ // request the persistent file system
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, onError);
+
+
+## 解决本地文件系统的 URI 快速示例
+
+ function onSuccess(fileEntry) {
+ console.log(fileEntry.name);
+ }
+
+ window.resolveLocalFileSystemURI("file:///example.txt", onSuccess, onError);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Local File System Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
+ window.resolveLocalFileSystemURI("file:///example.txt", onResolveSuccess, fail);
+ }
+
+ function onFileSystemSuccess(fileSystem) {
+ console.log(fileSystem.name);
+ }
+
+ function onResolveSuccess(fileEntry) {
+ console.log(fileEntry.name);
+ }
+
+ function fail(evt) {
+ console.log(evt.target.error.code);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Local File System</p>
+ </body>
+ </html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/file/metadata/metadata.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/file/metadata/metadata.md b/docs/zh/edge/cordova/file/metadata/metadata.md
new file mode 100644
index 0000000..d86efd0
--- /dev/null
+++ b/docs/zh/edge/cordova/file/metadata/metadata.md
@@ -0,0 +1,44 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 元数据
+
+供应状态信息的文件或目录的一个接口。
+
+## 属性
+
+* **modificationTime**: 当文件或目录被最后修改的时间。*(日期)*
+
+## 详细信息
+
+`Metadata`对象表示文件或目录的状态信息。 调用 `DirectoryEntry` 或 `FileEntry` 对象的 `getMetadata()` 方法将产生 `Metadata` 实例。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 快速的示例
+
+ function win(metadata) {
+ console.log("Last Modified: " + metadata.modificationTime);
+ }
+
+ // Request the metadata object for this entry
+ entry.getMetadata(win, null);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/geolocation/Coordinates/coordinates.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/geolocation/Coordinates/coordinates.md b/docs/zh/edge/cordova/geolocation/Coordinates/coordinates.md
new file mode 100644
index 0000000..9386d78
--- /dev/null
+++ b/docs/zh/edge/cordova/geolocation/Coordinates/coordinates.md
@@ -0,0 +1,123 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 坐标
+
+描述位置的地理坐标的属性集。
+
+## 属性
+
+* **纬度**: 纬度以十进制度为单位。*(人数)*
+
+* **经度**: 经度以十进制度为单位。*(人数)*
+
+* **海拔高度**: 高度在米以上椭球体中的位置。*(人数)*
+
+* **准确性**: 中米的纬度和经度坐标的精度级别。*(人数)*
+
+* **altitudeAccuracy**: 在米的海拔高度坐标的精度级别。*(人数)*
+
+* **标题**: 旅行,指定以度为单位计数相对于真北顺时针方向。*(人数)*
+
+* **速度**: 当前地面速度的设备,指定在米每秒。*(人数)*
+
+## 说明
+
+`Coordinates`对象附加到 `Position` 对象,可用于在当前职位的请求中的回调函数。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+## 快速的示例
+
+ // onSuccess Callback
+ //
+ var onSuccess = function(position) {
+ alert('Latitude: ' + position.coords.latitude + '\n' +
+ 'Longitude: ' + position.coords.longitude + '\n' +
+ 'Altitude: ' + position.coords.altitude + '\n' +
+ 'Accuracy: ' + position.coords.accuracy + '\n' +
+ 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' +
+ 'Heading: ' + position.coords.heading + '\n' +
+ 'Speed: ' + position.coords.speed + '\n' +
+ 'Timestamp: ' + position.timestamp + '\n');
+ };
+
+ // onError Callback
+ //
+ var onError = function() {
+ alert('onError!');
+ };
+
+ navigator.geolocation.getCurrentPosition(onSuccess, onError);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Geolocation Position Example</title>
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ navigator.geolocation.getCurrentPosition(onSuccess, onError);
+ }
+
+ // Display `Position` properties from the geolocation
+ //
+ function onSuccess(position) {
+ var div = document.getElementById('myDiv');
+
+ div.innerHTML = 'Latitude: ' + position.coords.latitude + '<br/>' +
+ 'Longitude: ' + position.coords.longitude + '<br/>' +
+ 'Altitude: ' + position.coords.altitude + '<br/>' +
+ 'Accuracy: ' + position.coords.accuracy + '<br/>' +
+ 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '<br/>' +
+ 'Heading: ' + position.coords.heading + '<br/>' +
+ 'Speed: ' + position.coords.speed + '<br/>';
+ }
+
+ // Show an alert if there is a problem getting the geolocation
+ //
+ function onError() {
+ alert('onError!');
+ }
+
+ </script>
+ </head>
+ <body>
+ <div id="myDiv"></div>
+ </body>
+ </html>
+
+
+## Android 的怪癖
+
+**altitudeAccuracy**: 不支持的 Android 设备,返回`null`.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/geolocation/Position/position.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/geolocation/Position/position.md b/docs/zh/edge/cordova/geolocation/Position/position.md
new file mode 100644
index 0000000..f647dc8
--- /dev/null
+++ b/docs/zh/edge/cordova/geolocation/Position/position.md
@@ -0,0 +1,111 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 位置
+
+包含 `Position` 坐标和时间戳,由地理位置 API 创建。
+
+## 属性
+
+* **coords**: 一组的地理坐标。*(坐标)*
+
+* **时间戳**: 创建时间戳为 `coords` 。*(日期)*
+
+## 说明
+
+`Position`创建和填充的科尔多瓦,并返回到用户通过一个回调函数对象。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+## 快速的示例
+
+ // onSuccess Callback
+ //
+ var onSuccess = function(position) {
+ alert('Latitude: ' + position.coords.latitude + '\n' +
+ 'Longitude: ' + position.coords.longitude + '\n' +
+ 'Altitude: ' + position.coords.altitude + '\n' +
+ 'Accuracy: ' + position.coords.accuracy + '\n' +
+ 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' +
+ 'Heading: ' + position.coords.heading + '\n' +
+ 'Speed: ' + position.coords.speed + '\n' +
+ 'Timestamp: ' + position.timestamp + '\n');
+ };
+
+ // onError Callback receives a PositionError object
+ //
+ function onError(error) {
+ alert('code: ' + error.code + '\n' +
+ 'message: ' + error.message + '\n');
+ }
+
+ navigator.geolocation.getCurrentPosition(onSuccess, onError);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Device Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ navigator.geolocation.getCurrentPosition(onSuccess, onError);
+ }
+
+ // onSuccess Geolocation
+ //
+ function onSuccess(position) {
+ var element = document.getElementById('geolocation');
+ element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' +
+ 'Longitude: ' + position.coords.longitude + '<br />' +
+ 'Altitude: ' + position.coords.altitude + '<br />' +
+ 'Accuracy: ' + position.coords.accuracy + '<br />' +
+ 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '<br />' +
+ 'Heading: ' + position.coords.heading + '<br />' +
+ 'Speed: ' + position.coords.speed + '<br />' +
+ 'Timestamp: ' + position.timestamp + '<br />';
+ }
+
+ // onError Callback receives a PositionError object
+ //
+ function onError(error) {
+ alert('code: ' + error.code + '\n' +
+ 'message: ' + error.message + '\n');
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="geolocation">Finding geolocation...</p>
+ </body>
+ </html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/geolocation/PositionError/positionError.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/geolocation/PositionError/positionError.md b/docs/zh/edge/cordova/geolocation/PositionError/positionError.md
new file mode 100644
index 0000000..c59f680
--- /dev/null
+++ b/docs/zh/edge/cordova/geolocation/PositionError/positionError.md
@@ -0,0 +1,47 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# PositionError
+
+A `PositionError` 对象传递给 `geolocationError` 回调时出现错误。
+
+## 属性
+
+* **代码**: 下面列出的预定义的错误代码之一。
+
+* **消息**: 描述所遇到的错误的详细信息的错误消息。
+
+## 常量
+
+* `PositionError.PERMISSION_DENIED`
+* `PositionError.POSITION_UNAVAILABLE`
+* `PositionError.TIMEOUT`
+
+## 说明
+
+`PositionError`对象传递给 `geolocationError` 与地理定位发生错误时的回调函数。
+
+### `PositionError.PERMISSION_DENIED`
+
+返回当用户不允许您的应用程序检索的位置信息。这是取决于平台。
+
+### `PositionError.POSITION_UNAVAILABLE`
+
+返回设备时,不能检索的位置。这就意味着该设备没有网络连接和/或不能得到卫星的修复。
+
+### `PositionError.TIMEOUT`
+
+返回设备时,无法在指定的时间内检索位置 `geolocationOptions` ' `timeout` 属性。 与一起使用时 `geolocation.watchPosition` ,此错误可能传递给 `geolocationError` 回调每 `timeout` 毫秒为单位)。
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/geolocation/geolocation.clearWatch.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/geolocation/geolocation.clearWatch.md b/docs/zh/edge/cordova/geolocation/geolocation.clearWatch.md
new file mode 100644
index 0000000..397cd8d
--- /dev/null
+++ b/docs/zh/edge/cordova/geolocation/geolocation.clearWatch.md
@@ -0,0 +1,108 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# geolocation.clearWatch
+
+再看对所引用的设备的位置更改为 `watchID` 参数。
+
+ navigator.geolocation.clearWatch(watchID);
+
+
+## 参数
+
+* **watchID**: 的 id `watchPosition` 清除的时间间隔。(字符串)
+
+## 说明
+
+`geolocation.clearWatch`将停止观看对设备的位置的更改通过清除 `geolocation.watchPosition` 引用的`watchID`.
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+## 快速的示例
+
+ / / 选项: 监视的更改的位置,并使用最 / / 准确定位采集方法可用。
+ //
+ var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { enableHighAccuracy: true });
+
+ // ...later on...
+
+ navigator.geolocation.clearWatch(watchID);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Device Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ var watchID = null;
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ // Get the most accurate position updates available on the
+ // device.
+ var options = { enableHighAccuracy: true };
+ watchID = navigator.geolocation.watchPosition(onSuccess, onError, options);
+ }
+
+ // onSuccess Geolocation
+ //
+ function onSuccess(position) {
+ var element = document.getElementById('geolocation');
+ element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' +
+ 'Longitude: ' + position.coords.longitude + '<br />' +
+ '<hr />' + element.innerHTML;
+ }
+
+ // clear the watch that was started earlier
+ //
+ function clearWatch() {
+ if (watchID != null) {
+ navigator.geolocation.clearWatch(watchID);
+ watchID = null;
+ }
+ }
+
+ // onError Callback receives a PositionError object
+ //
+ function onError(error) {
+ alert('code: ' + error.code + '\n' +
+ 'message: ' + error.message + '\n');
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="geolocation">Watching geolocation...</p>
+ <button onclick="clearWatch();">Clear Watch</button>
+ </body>
+ </html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/geolocation/geolocation.getCurrentPosition.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/geolocation/geolocation.getCurrentPosition.md b/docs/zh/edge/cordova/geolocation/geolocation.getCurrentPosition.md
new file mode 100644
index 0000000..a6a3952
--- /dev/null
+++ b/docs/zh/edge/cordova/geolocation/geolocation.getCurrentPosition.md
@@ -0,0 +1,120 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# geolocation.getCurrentPosition
+
+返回设备的当前位置作为 `Position` 对象。
+
+ navigator.geolocation.getCurrentPosition(geolocationSuccess,
+ [geolocationError],
+ [geolocationOptions]);
+
+
+## 参数
+
+* **geolocationSuccess**: 传递当前位置的回调。
+
+* **geolocationError**: *(可选)*如果错误发生时执行的回调。
+
+* **geolocationOptions**: *(可选)*地理定位选项。
+
+## 说明
+
+`geolocation.getCurrentPosition`是一个异步的函数。 它将返回到该设备的当前位置 `geolocationSuccess` 回调与 `Position` 对象作为参数。 如果有错误, `geolocationError` 回调通过 `PositionError` 对象。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+## 快速的示例
+
+ // onSuccess Callback
+ // This method accepts a Position object, which contains the
+ // current GPS coordinates
+ //
+ var onSuccess = function(position) {
+ alert('Latitude: ' + position.coords.latitude + '\n' +
+ 'Longitude: ' + position.coords.longitude + '\n' +
+ 'Altitude: ' + position.coords.altitude + '\n' +
+ 'Accuracy: ' + position.coords.accuracy + '\n' +
+ 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' +
+ 'Heading: ' + position.coords.heading + '\n' +
+ 'Speed: ' + position.coords.speed + '\n' +
+ 'Timestamp: ' + position.timestamp + '\n');
+ };
+
+ // onError Callback receives a PositionError object
+ //
+ function onError(error) {
+ alert('code: ' + error.code + '\n' +
+ 'message: ' + error.message + '\n');
+ }
+
+ navigator.geolocation.getCurrentPosition(onSuccess, onError);
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Device Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ navigator.geolocation.getCurrentPosition(onSuccess, onError);
+ }
+
+ // onSuccess Geolocation
+ //
+ function onSuccess(position) {
+ var element = document.getElementById('geolocation');
+ element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' +
+ 'Longitude: ' + position.coords.longitude + '<br />' +
+ 'Altitude: ' + position.coords.altitude + '<br />' +
+ 'Accuracy: ' + position.coords.accuracy + '<br />' +
+ 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '<br />' +
+ 'Heading: ' + position.coords.heading + '<br />' +
+ 'Speed: ' + position.coords.speed + '<br />' +
+ 'Timestamp: ' + position.timestamp + '<br />';
+ }
+
+ // onError Callback receives a PositionError object
+ //
+ function onError(error) {
+ alert('code: ' + error.code + '\n' +
+ 'message: ' + error.message + '\n');
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="geolocation">Finding geolocation...</p>
+ </body>
+ </html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/geolocation/geolocation.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/geolocation/geolocation.md b/docs/zh/edge/cordova/geolocation/geolocation.md
new file mode 100644
index 0000000..42a18d3
--- /dev/null
+++ b/docs/zh/edge/cordova/geolocation/geolocation.md
@@ -0,0 +1,81 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# 地理定位
+
+> `geolocation`对象提供对基于设备的 GPS 传感器或推断网络信号的位置数据的访问。
+
+`Geolocation`提供有关该设备的位置,例如纬度和经度信息。 常见的位置信息来源包括全球定位系统 (GPS) 和网络信号,如 IP 地址、 RFID、 WiFi 和蓝牙 MAC 地址和 GSM/CDMA 单元格 Id 从推断出的位置。 没有任何保证,API 返回设备的实际位置。
+
+此 API 基于[W3C 地理定位 API 规范][1],并只执行已经不提供实现的设备上。
+
+ [1]: http://dev.w3.org/geo/api/spec-source.html
+
+**重要的隐私注:**地理定位数据的收集和使用提出了重要的隐私问题。 您的应用程序的隐私策略应该讨论这款应用程序如何使用地理定位数据,数据是否共享它的任何其他缔约方和的数据 (例如,粗、 细,ZIP 代码级别,等等) 的精度水平。 地理定位数据被普遍认为敏感的因为它能揭示一个人的下落,如果存储中,他或她的旅行史。 因此,除了您的应用程序的隐私策略,您应强烈考虑提供在您的应用程序访问地理定位数据 (如果设备操作系统不会这样做已经) 之前的时间只是通知。 该通知应提供相同的信息上文指出的并获取该用户的权限 (例如,通过为**确定**并**不感谢**提出的选择)。 有关详细信息,请参阅隐私指南。
+
+## 方法
+
+* geolocation.getCurrentPosition
+* geolocation.watchPosition
+* geolocation.clearWatch
+
+## 参数
+
+* geolocationSuccess
+* geolocationError
+* geolocationOptions
+
+## 对象 (只读)
+
+* 位置
+* PositionError
+* 坐标
+
+## 访问功能
+
+从 3.0 版,科尔多瓦作为*插件*实现了设备级 Api。 使用 CLI 的 `plugin` 命令,描述在命令行界面,可以添加或删除一个项目,为此功能:
+
+ $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
+ $ cordova plugin rm org.apache.cordova.core.geolocation
+
+
+这些命令适用于所有有针对性的平台,但修改如下所述的特定于平台的配置设置:
+
+* Android 系统
+
+ (in app/res/xml/config.xml) < 功能名称 ="地理定位">< 参数名称 ="android 包"value="org.apache.cordova.GeoBroker"/ >< / 功能 > (在 app/AndroidManifest.xml) < 使用权限 android:name="android.permission.ACCESS_COARSE_LOCATION"/ >< 使用权限 android:name="android.permission.ACCESS_FINE_LOCATION"/ >< 使用权限 android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/ >
+
+
+* 黑莓手机 WebWorks
+
+ (in www/plugins.xml) < 功能名称 ="地理定位">< 参数名称 ="黑莓手机-包"value="org.apache.cordova.geolocation.Geolocation"/ >< / 功能 > (在 www/config.xml) < rim: 权限 >< rim: 许可证 > read_geolocation < / rim: 许可证 >< / rim: 权限 >
+
+
+* (在 iOS`config.xml`)
+
+ < 功能名称 ="地理定位">< 参数名称 ="ios 包"值 ="CDVLocation"/ >< / 功能 >
+
+
+* (在 Windows Phone`Properties/WPAppManifest.xml`)
+
+ < 功能 >< 功能名称 ="ID_CAP_LOCATION"/ >< / 功能 >
+
+
+ 引用:[为 Windows Phone 应用程序清单][2]
+
+ [2]: http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx
+
+一些平台可能支持此功能,而无需任何特殊的配置。有关概述,请参见平台支持。
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/992e9151/docs/zh/edge/cordova/geolocation/geolocation.watchPosition.md
----------------------------------------------------------------------
diff --git a/docs/zh/edge/cordova/geolocation/geolocation.watchPosition.md b/docs/zh/edge/cordova/geolocation/geolocation.watchPosition.md
new file mode 100644
index 0000000..ff86671
--- /dev/null
+++ b/docs/zh/edge/cordova/geolocation/geolocation.watchPosition.md
@@ -0,0 +1,121 @@
+---
+
+license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+
+
+ under the License.
+---
+
+# geolocation.watchPosition
+
+对该设备的当前的位置更改的手表。
+
+ var watchId = navigator.geolocation.watchPosition(geolocationSuccess,
+ [geolocationError],
+ [geolocationOptions]);
+
+
+## 参数
+
+* **geolocationSuccess**: 传递当前位置的回调。
+
+* **geolocationError**: (可选) 如果错误发生时执行的回调。
+
+* **geolocationOptions**: (可选) 地理定位选项。
+
+## 返回
+
+* **字符串**: 返回引用的观看位置间隔的表 id。应与一起使用的表 id `geolocation.clearWatch` 停止了观看中位置的更改。
+
+## 说明
+
+`geolocation.watchPosition`是一个异步的函数。 当检测到位置更改时,它返回该设备的当前的位置。 当设备中检索一个新的位置, `geolocationSuccess` 回调执行与 `Position` 对象作为参数。 如果有错误, `geolocationError` 回调执行与 `PositionError` 对象作为参数。
+
+## 支持的平台
+
+* Android 系统
+* 黑莓手机 WebWorks (OS 5.0 和更高)
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+## 快速的示例
+
+ // onSuccess Callback
+ // This method accepts a `Position` object, which contains
+ // the current GPS coordinates
+ //
+ function onSuccess(position) {
+ var element = document.getElementById('geolocation');
+ element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' +
+ 'Longitude: ' + position.coords.longitude + '<br />' +
+ '<hr />' + element.innerHTML;
+ }
+
+ // onError Callback receives a PositionError object
+ //
+ function onError(error) {
+ alert('code: ' + error.code + '\n' +
+ 'message: ' + error.message + '\n');
+ }
+
+ // Options: throw an error if no update is received every 30 seconds.
+ //
+ var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { timeout: 30000 });
+
+
+## 完整的示例
+
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Device Properties Example</title>
+
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ // Wait for device API libraries to load
+ //
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ var watchID = null;
+
+ // device APIs are available
+ //
+ function onDeviceReady() {
+ // Throw an error if no update is received every 30 seconds
+ var options = { timeout: 30000 };
+ watchID = navigator.geolocation.watchPosition(onSuccess, onError, options);
+ }
+
+ // onSuccess Geolocation
+ //
+ function onSuccess(position) {
+ var element = document.getElementById('geolocation');
+ element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' +
+ 'Longitude: ' + position.coords.longitude + '<br />' +
+ '<hr />' + element.innerHTML;
+ }
+
+ // onError Callback receives a PositionError object
+ //
+ function onError(error) {
+ alert('code: ' + error.code + '\n' +
+ 'message: ' + error.message + '\n');
+ }
+
+ </script>
+ </head>
+ <body>
+ <p id="geolocation">Watching geolocation...</p>
+ </body>
+ </html>
\ No newline at end of file