examples/phonegap1/plugins/cordova-plugin-globalization/src/blackberry10/index.js
function (successCB, failureCB, args, env) {
        var result = new PluginResult(args, env);
        var response = g11n.getInstance().InvokeMethod('getNumberPattern', args);
        var data = JSON.parse(response);
        console.log('getNumberPattern: ' + JSON.stringify(response));

        if (data.error !== undefined) {
            result.error({
                code: data.error.code,
                message: data.error.message
            });
        } else {
            result.ok({
                pattern: data.result.pattern,
                symbol: data.result.symbol,
                fraction: data.result.fraction,
                rounding: data.result.rounding,
                positive: data.result.positive,
                negative: data.result.negative,
                decimal: data.result.decimal,
                grouping: data.result.grouping
            });
        }
    }
function (successCB, failureCB, args, env) {
        var result = new PluginResult(args, env);
        var response = g11n.getInstance().InvokeMethod('getNumberPattern', args);
        var data = JSON.parse(response);
        console.log('getNumberPattern: ' + JSON.stringify(response));

        if (data.error !== undefined) {
            result.error({
                code: data.error.code,
                message: data.error.message
            });
        } else {
            result.ok({
                pattern: data.result.pattern,
                symbol: data.result.symbol,
                fraction: data.result.fraction,
                rounding: data.result.rounding,
                positive: data.result.positive,
                negative: data.result.negative,
                decimal: data.result.decimal,
                grouping: data.result.grouping
            });
        }
    }
function ( successCB , failureCB , args , env ) { var result = new PluginResult ( args , env ) ; var response = g11n . getInstance ( ) . InvokeMethod ( 'getNumberPattern' , args ) ; var data = JSON . parse ( response ) ; console . log ( 'getNumberPattern: ' + JSON . stringify ( response ) ) ; if ( data . error !== undefined ) { result . error ( { code : data . error . code , message : data . error . message } ) ; } else { result . ok ( { pattern : data . result . pattern , symbol : data . result . symbol , fraction : data . result . fraction , rounding : data . result . rounding , positive : data . result . positive , negative : data . result . negative , decimal : data . result . decimal , grouping : data . result . grouping } ) ; } }
Returns a pattern string for formatting and parsing numbers according to the client's user
preferences. It returns the pattern to the successCB callback with a properties object as a
parameter. If there is an error obtaining the pattern, then the errorCB callback is invoked.

The defaults are: type="decimal"

@param {Function} successCB
@param {Function} errorCB
@param {Object} options {optional}
type {String}: 'decimal', "percent", or 'currency'

@return    Object.pattern {String}: The number pattern for formatting and parsing numbers.
The patterns follow Unicode Technical Standard #35.
http://unicode.org/reports/tr35/tr35-4.html
Object.symbol {String}: The symbol to be used when formatting and parsing
e.g., percent or currency symbol.
Object.fraction {Number}: The number of fractional digits to use when parsing and
formatting numbers.
Object.rounding {Number}: The rounding increment to use when parsing and formatting.
Object.positive {String}: The symbol to use for positive numbers when parsing and formatting.
Object.negative: {String}: The symbol to use for negative numbers when parsing and formatting.
Object.decimal: {String}: The decimal symbol to use for parsing and formatting.
Object.grouping: {String}: The grouping symbol to use for parsing and formatting.

@error GlobalizationError.PATTERN_ERROR

Example
globalization.getNumberPattern(
function (pattern) {alert('Pattern:' + pattern.pattern + '\n');},
function () {});
Returns a pattern string for formatting and parsing numbers according to the client s user preferences . It returns the pattern to the successCB callback with a properties object as a parameter . If there is an error obtaining the pattern then the errorCB callback is invoked .