META-INF.resources.bower_components.globalize.src.message-runtime.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/runtime-key",
"./common/validate/parameter-type/message-variables",
"./core-runtime",
"./message/formatter-fn"
], function (runtimeKey, validateParameterTypeMessageVariables, Globalize, messageFormatterFn) {
Globalize._messageFormatterFn = messageFormatterFn;
Globalize._messageFormat = {};
Globalize._validateParameterTypeMessageVariables = validateParameterTypeMessageVariables;
Globalize.messageFormatter =
Globalize.prototype.messageFormatter = function (/* path */) {
return Globalize[
runtimeKey("messageFormatter", this._locale, [].slice.call(arguments, 0))
];
};
Globalize.formatMessage =
Globalize.prototype.formatMessage = function (path /* , variables */) {
return this.messageFormatter(path).apply({}, [].slice.call(arguments, 1));
};
return Globalize;
});