ant-design/components/modal/locale.tsx

22 lines
447 B
TypeScript
Raw Normal View History

2016-06-22 13:18:43 +08:00
import assign from 'object-assign';
const defaultLocale = {
okText: '确定',
cancelText: '取消',
justOkText: '知道了',
};
2016-06-22 13:18:43 +08:00
let runtimeLocale = assign({}, defaultLocale);
2016-08-02 16:10:26 +08:00
export function changeConfirmLocale(newLocale?: Object) {
if (newLocale) {
2016-06-22 13:18:43 +08:00
runtimeLocale = assign({}, runtimeLocale, newLocale);
} else {
2016-06-22 13:18:43 +08:00
runtimeLocale = assign({}, defaultLocale);
}
}
2016-05-12 15:11:25 +08:00
export function getConfirmLocale() {
return runtimeLocale;
}