getLocale 函式用來取得目前的在地化語言代碼。詳見 在地化。
getLocale
按需引入函式:
import { getLocale } from 'mdui/functions/getLocale.js';
使用範例:
// 取得目前的在地化語言代碼 getLocale();
getLocale(): LocaleCode
函式的回傳值為語言代碼,語言代碼清單參見 支援的語言。