Merge branch 'master' into new-torrent

This commit is contained in:
nikk gitanes
2021-09-21 09:33:09 +03:00
13 changed files with 603 additions and 51 deletions

View File

@@ -2,12 +2,7 @@ import { useTranslation } from 'react-i18next'
export default () => {
const { i18n } = useTranslation()
const currentLanguage =
i18n.language === 'en-US' || i18n.language === 'en'
? 'en'
: i18n.language === 'ru-RU' || i18n.language === 'ru'
? 'ru'
: i18n.language
const currentLanguage = i18n.language.substr(0, 2)
return [currentLanguage, lang => i18n.changeLanguage(lang)]
}