perf(i18n): 检测使用设备语言

feature/price_manager
Lei OT 1 year ago
parent b5c13f238d
commit d8bc4d2ff4

@ -19,10 +19,14 @@ i18n
}, },
ns: ['common', 'group'], ns: ['common', 'group'],
defaultNS: 'common', defaultNS: 'common',
// detection: { detection: {
// convertDetectedLanguage: 'Iso15897', // convertDetectedLanguage: 'Iso15897',
// convertDetectedLanguage: (lng) => lng.replace('-', '_') convertDetectedLanguage: (lng) => {
// }, const langPart = lng.split('-')[0];
return langPart;
// return lng.replace('-', '_');
},
},
supportedLngs: ['en', 'zh'], supportedLngs: ['en', 'zh'],
// resources: { // resources: {
// en: { translation: en }, // en: { translation: en },

Loading…
Cancel
Save