Hi Stefan,
I haven't tried this before, but did once considered to include this in a custom widget.
Mendix makes use of the Dojo-toolkit, for localization (translation/formatting). You should be able to include the format-function in your widget and call this function.
Reference: https://dojotoolkit.org/reference-guide/1.10/dojo/date/locale/format.html#dojo-date-locale-format
require(["dojo/date/locale"], function(locale){
locale.format(new Date(),{
selector: "date",
formatLength: "short"
});
})
Hopefully this helps a little bit! Please share your solution when you did succesfully implement this.
Mendix api has calls for that, you can start with
mx.session.getConfig().uiconfig.locale
or
getLocale: function() {
if (kernel) {
return kernel.locale;
}
return mx.ui.getLocale();
},
Don't know what's the most actual yet.