移动目录

This commit is contained in:
CrescentLeaf
2025-11-23 13:27:15 +08:00
parent f13623f4fc
commit 1cb8ac3fff
479 changed files with 49 additions and 49 deletions

View File

@@ -0,0 +1,11 @@
import { getLocale as getLocaleInternal, uninitializedError, } from '../internal/localize.js';
/**
* 获取当前的语言代码。如果当前正在加载新的语言包,则该函数仍返回先前的语言代码
* @return string 当前的语言代码
*/
export const getLocale = () => {
if (!getLocaleInternal) {
throw new Error(uninitializedError);
}
return getLocaleInternal();
};