@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
21 lines (20 loc) • 547 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDisplayNames = getDisplayNames;
var _constants = require("../constants");
var _log = require("./log");
function getDisplayNames() {
var lang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _constants.DEFAULT_LANG;
try {
return new Intl.DisplayNames(lang, {
type: 'region'
});
} catch (error) {
(0, _log.log)(error);
return new Intl.DisplayNames(_constants.DEFAULT_LANG, {
type: 'region'
});
}
}