Nuxt content tool chain

This commit is contained in:
2024-08-13 22:44:36 +08:00
parent 653ade9acc
commit 950ee1f489
11 changed files with 70 additions and 17 deletions

7
utils/locale.ts Normal file
View File

@ -0,0 +1,7 @@
export function getLocale() {
const fallbackLocale = "en"
const supportedLocales = ["en", "zh-CN"]
const { locale } = useI18n()
return supportedLocales.includes(locale.value) ? locale.value : fallbackLocale;
}