This commit is contained in:
Silent YANG 2024-05-12 12:01:41 +08:00
parent 31aa5c33b5
commit 3b97001dd8

View file

@ -6,7 +6,7 @@ export const LOCALE_OPTIONS = [
{ label: '中文', value: 'zh-CN' },
{ label: 'English', value: 'en-US' },
];
const defaultLocale = localStorage.getItem('arco-locale') || 'zh-CN';
const defaultLocale = localStorage.getItem('arco-locale') || navigator.language || 'en-US';
const i18n = createI18n({
locale: defaultLocale,