@qooxdoo/framework
Version:
The JS Framework for Coders
65 lines (52 loc) • 1.69 kB
JavaScript
/* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2004-2008 1&1 Internet AG, Germany, http://www.1und1.de
License:
MIT: https://opensource.org/licenses/MIT
See the LICENSE file in the project's top-level directory for details.
Authors:
* Sebastian Werner (wpbasti)
* Andreas Ecker (ecker)
* Fabian Jakobs (fjakobs)
************************************************************************ */
/**
* Provides information about locale-dependent number formatting (like the decimal
* separator).
*
* @cldr()
*/
qx.Class.define("qx.locale.Number",
{
statics :
{
/**
* Get decimal separator for number formatting
*
* @param locale {String} optional locale to be used
* @return {String} decimal separator.
*/
getDecimalSeparator : function(locale) {
return qx.locale.Manager.getInstance().localize("cldr_number_decimal_separator", [], locale);
},
/**
* Get thousand grouping separator for number formatting
*
* @param locale {String} optional locale to be used
* @return {String} group separator.
*/
getGroupSeparator : function(locale) {
return qx.locale.Manager.getInstance().localize("cldr_number_group_separator", [], locale);
},
/**
* Get percent format string
*
* @param locale {String} optional locale to be used
* @return {String} percent format string.
*/
getPercentFormat : function(locale) {
return qx.locale.Manager.getInstance().localize("cldr_number_percent_format", [], locale);
}
}
});