META-INF.resources.bower_components.globalize.src.currency.name-format.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-globalize Show documentation
Show all versions of jwebmp-globalize Show documentation
The JWebSwing implementation for a full Globalization
define([
"../common/format-message"
], function (formatMessage) {
/**
* nameFormat( formattedNumber, pluralForm, properties )
*
* Return the appropriate name form currency format.
*/
return function (formattedNumber, pluralForm, properties) {
var displayName, unitPattern,
displayNames = properties.displayNames || {},
unitPatterns = properties.unitPatterns;
displayName = displayNames["displayName-count-" + pluralForm] ||
displayNames["displayName-count-other"] ||
displayNames.displayName ||
properties.currency;
unitPattern = unitPatterns["unitPattern-count-" + pluralForm] ||
unitPatterns["unitPattern-count-other"];
return formatMessage(unitPattern, [formattedNumber, displayName]);
};
});