You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
538 B

import enUS from '../locale-provider/en_US';
7 years ago
export interface ModalLocale {
okText: string;
cancelText: string;
justOkText: string;
}
const defaultLocale: ModalLocale = enUS.Modal;
7 years ago
let runtimeLocale: ModalLocale = {
...defaultLocale,
};
7 years ago
export function changeConfirmLocale(newLocale?: ModalLocale) {
if (newLocale) {
runtimeLocale = {
...runtimeLocale,
...newLocale,
};
} else {
runtimeLocale = {
...defaultLocale,
};
}
}
9 years ago
export function getConfirmLocale() {
return runtimeLocale;
}