ant-design/components/modal/locale.js
2016-05-12 13:25:00 +08:00

20 lines
398 B
JavaScript

const defaultLocale = {
okText: '确定',
cancelText: '取消',
justOkText: '知道了',
};
let runtimeLocale = { ...defaultLocale };
export function changeConfirmLocale(newLocale) {
if (newLocale) {
runtimeLocale = { ...runtimeLocale, ...newLocale };
} else {
runtimeLocale = { ...defaultLocale };
}
}
export function getConfirmLocale(newLocale) {
return runtimeLocale;
}