
META-INF.resources.bower_components.globalize.src.number.numbering-system.js Maven / Gradle / Ivy
define(function () {
/**
* NumberingSystem( cldr )
*
* - http://www.unicode.org/reports/tr35/tr35-numbers.html#otherNumberingSystems
* - http://cldr.unicode.org/index/bcp47-extension
* - http://www.unicode.org/reports/tr35/#u_Extension
*/
return function (cldr) {
var nu = cldr.attributes["u-nu"];
if (nu) {
if (nu === "traditio") {
nu = "traditional";
}
if (["native", "traditional", "finance"].indexOf(nu) !== -1) {
// Unicode locale extension `u-nu` is set using either (native, traditional or
// finance). So, lookup the respective locale's numberingSystem and return it.
return cldr.main(["numbers/otherNumberingSystems", nu]);
}
// Unicode locale extension `u-nu` is set with an explicit numberingSystem. Return it.
return nu;
}
// Return the default numberingSystem.
return cldr.main("numbers/defaultNumberingSystem");
};
});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy