File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,14 @@ export const translationsJson = {
2424convertLanguageJsonToObject ( en ) ;
2525
2626export const changeLang = lang => {
27- i18next . changeLanguage ( lang ) ;
28- requestInstance . defaults . headers [ 'Accept-Language' ] =
29- lang === 'zh' ? 'zh-CN' : 'en-US' ; // FIXME locale
3027 localStorage . setItem ( StorageKeys . Locale , lang ) ;
31- moment . locale ( lang === 'zh' ? 'zh-cn' : 'en-us' ) ; // FIXME locale
3228 window . location && window . location . reload ( ) ;
3329} ;
3430
3531const initialLocale = getInitialLocale ( ) ;
36- moment . locale ( initialLocale ) ;
32+ requestInstance . defaults . headers [ 'Accept-Language' ] =
33+ initialLocale === 'zh' ? 'zh-CN' : 'en-US' ; // FIXME locale
34+ moment . locale ( initialLocale === 'zh' ? 'zh-cn' : 'en-us' ) ; // FIXME locale
3735
3836export const i18n = i18next
3937 // pass the i18n instance to react-i18next.
You can’t perform that action at this time.
0 commit comments