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.
29 lines
536 B
29 lines
536 B
import defaultLocale from '../locale/en_US';
|
|
|
|
export interface ModalLocale {
|
|
okText: string;
|
|
cancelText: string;
|
|
justOkText: string;
|
|
}
|
|
|
|
let runtimeLocale: ModalLocale = {
|
|
...(defaultLocale.Modal as ModalLocale),
|
|
};
|
|
|
|
export function changeConfirmLocale(newLocale?: ModalLocale) {
|
|
if (newLocale) {
|
|
runtimeLocale = {
|
|
...runtimeLocale,
|
|
...newLocale,
|
|
};
|
|
} else {
|
|
runtimeLocale = {
|
|
...(defaultLocale.Modal as ModalLocale),
|
|
};
|
|
}
|
|
}
|
|
|
|
export function getConfirmLocale() {
|
|
return runtimeLocale;
|
|
}
|