devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
22 lines (21 loc) • 716 B
JavaScript
/**
* DevExtreme (cjs/localization/parentLocale.js)
* Version: 21.1.4
* Build date: Mon Jun 21 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
exports.default = void 0;
var PARENT_LOCALE_SEPARATOR = "-";
var _default = function(parentLocales, locale) {
var parentLocale = parentLocales[locale];
if (parentLocale) {
return "root" !== parentLocale && parentLocale
}
return locale.substr(0, locale.lastIndexOf(PARENT_LOCALE_SEPARATOR))
};
exports.default = _default;
module.exports = exports.default;
module.exports.default = exports.default;