소스 검색

bugfix: Internationalized switching languages require manual refresh

close #5579
chenshuai2144 6 년 전
부모
커밋
4b93281b62
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/components/SelectLang/index.tsx

+ 1 - 1
src/components/SelectLang/index.tsx

@@ -13,7 +13,7 @@ interface SelectLangProps {
 const SelectLang: React.FC<SelectLangProps> = props => {
   const { className } = props;
   const selectedLang = getLocale();
-  const changeLang = ({ key }: ClickParam): void => setLocale(key, false);
+  const changeLang = ({ key }: ClickParam): void => setLocale(key);
   const locales = ['zh-CN', 'zh-TW', 'en-US', 'pt-BR'];
   const languageLabels = {
     'zh-CN': '简体中文',