提交正式官网
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import type { LocaleBundle, SiteLocale } from '~/types/locale'
|
||||
|
||||
export function pickLocale<T>(bundle: LocaleBundle<T>, locale: SiteLocale): T {
|
||||
if (locale === 'zh' && bundle.zh) {
|
||||
return bundle.zh
|
||||
}
|
||||
return bundle.en
|
||||
}
|
||||
Reference in New Issue
Block a user