@alifd/meet-react
Version:
Fusion Mobile React UI System Component
10 lines • 512 B
JavaScript
export function getLocale(locale, componentName) {
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var defaultLocale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var _props$locale = props.locale,
componentLocale = _props$locale === void 0 ? {} : _props$locale;
try {
delete props.locale;
} catch (e) {}
return Object.assign(Object.assign(Object.assign({}, defaultLocale), locale[componentName] || {}), componentLocale || {});
}