diff --git a/src/i18n/index.js b/src/i18n/index.js index 7611f57..10e586c 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -19,10 +19,14 @@ i18n }, ns: ['common', 'group'], defaultNS: 'common', - // detection: { - // convertDetectedLanguage: 'Iso15897', - // convertDetectedLanguage: (lng) => lng.replace('-', '_') - // }, + detection: { + // convertDetectedLanguage: 'Iso15897', + convertDetectedLanguage: (lng) => { + const langPart = lng.split('-')[0]; + return langPart; + // return lng.replace('-', '_'); + }, + }, supportedLngs: ['en', 'zh'], // resources: { // en: { translation: en },