incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject js commit: Added missing comments to getPreferredLanguage(). Part of CB-1473.
Date Sat, 22 Sep 2012 14:20:48 GMT
Updated Branches:
  refs/heads/master 4e56be277 -> 34c8aa242


Added missing comments to getPreferredLanguage(). Part of CB-1473.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/34c8aa24
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/34c8aa24
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/34c8aa24

Branch: refs/heads/master
Commit: 34c8aa2423cc148f2b8739f71517f8cdd4b2ce71
Parents: 4e56be2
Author: Marcel Kinard <cmarcelk@gmail.com>
Authored: Fri Sep 21 11:26:14 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Sat Sep 22 10:17:22 2012 -0400

----------------------------------------------------------------------
 lib/common/plugin/globalization.js |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/34c8aa24/lib/common/plugin/globalization.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/globalization.js b/lib/common/plugin/globalization.js
index 2166bb1..a57062c 100644
--- a/lib/common/plugin/globalization.js
+++ b/lib/common/plugin/globalization.js
@@ -24,6 +24,23 @@ var exec = require('cordova/exec'),
 
 var globalization = {
 
+/**
+* Returns the string identifier for the client's current language.
+* It returns the language identifier string to the successCB callback with a
+* properties object as a parameter. If there is an error getting the language,
+* then the errorCB callback is invoked.
+*
+* @param {Function} successCB
+* @param {Function} errorCB
+*
+* @return Object.value {String}: The language identifier
+*
+* @error GlobalizationError.UNKNOWN_ERROR
+*
+* Example
+*    globalization.getPreferredLanguage(function (language) {alert('language:' + language.value
+ '\n');},
+*                                function () {});
+*/
 getPreferredLanguage:function(successCB, failureCB) {
     // successCallback required
     if (typeof successCB != "function") {


Mime
View raw message