Files
LingChair/mdui_patched/functions/setLocale.js
CrescentLeaf 1cb8ac3fff 移动目录
2025-11-23 13:27:15 +08:00

12 lines
383 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { setLocale as setLocaleInternal, uninitializedError, } from '../internal/localize.js';
/**
* 切换到指定的语言。返回 Promise在新的语言包加载完成后 resolve
* @param locale 语言代码
*/
export const setLocale = (locale) => {
if (!setLocaleInternal) {
throw new Error(uninitializedError);
}
return setLocaleInternal(locale);
};