diff --git a/package.json b/package.json index 10a7d4f0..d94d0204 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dependencies": { "history": "4.10.1", "i18next": "19.7.0", + "i18next-browser-languagedetector": "^6.0.1", "lodash.difference": "4.5.0", "lodash.intersection": "4.4.0", "lodash.union": "4.6.0", diff --git a/src/components/InfoPage.js b/src/components/InfoPage.js index c89e1e93..6c2ee5de 100644 --- a/src/components/InfoPage.js +++ b/src/components/InfoPage.js @@ -10,6 +10,7 @@ import InfoParticipants from './InfoParticipants'; import InfoRecommendation from './InfoRecommendation'; import InfoReports from './InfoReports'; import InfoUsage from './InfoUsage'; +import LanguageSwitcher from './LanguageSwitcher'; import styles from './InfoPage.module.css'; @@ -21,6 +22,11 @@ function InfoPage() { title: { content: t('info.aboutTitle') }, content: { content: }, }, + { + key: 'info.language', + title: { content: t('app.language') }, + content: { content: }, + }, { key: 'info.bugs', title: { content: t('info.bugsTitle') }, diff --git a/src/components/LanguageSwitcher.js b/src/components/LanguageSwitcher.js new file mode 100644 index 00000000..b0ca4057 --- /dev/null +++ b/src/components/LanguageSwitcher.js @@ -0,0 +1,26 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; + +import Button from './Button'; + +function LanguageSwitcher() { + const { i18n } = useTranslation(); + return ( + +