diff --git a/package.json b/package.json index c92a2cb..3a4904a 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,11 @@ "build": "webpack --mode production --progress" }, "dependencies": { + "i18next": "^21.5.2", + "i18next-browser-languagedetector": "^6.1.2", "react": "^17.0.1", "react-dom": "^17.0.1", + "react-i18next": "^11.14.2", "react-is": "^17.0.1", "react-router-dom": "^5.2.0", "styled-components": "^5.2.1" diff --git a/src/assets/arrow-down.svg b/src/assets/arrow-down.svg new file mode 100644 index 0000000..38efde6 --- /dev/null +++ b/src/assets/arrow-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Navigation.tsx b/src/components/home/Navigation.tsx similarity index 61% rename from src/components/Navigation.tsx rename to src/components/home/Navigation.tsx index 5008837..80b9a13 100644 --- a/src/components/Navigation.tsx +++ b/src/components/home/Navigation.tsx @@ -1,26 +1,29 @@ import React from 'react' import { Link } from 'react-router-dom' import styled from 'styled-components' -import { Colors } from '../constants' -import arrow from '../assets/arrow.svg' +import { Colors } from '../../constants/styles' +import arrow from '../../assets/arrow.svg' +import { useTranslation } from 'react-i18next' export function Navigation() { + const { t, i18n } = useTranslation() + return ( ) diff --git a/src/components/page/LanguageSelector.tsx b/src/components/page/LanguageSelector.tsx new file mode 100644 index 0000000..16bd4bb --- /dev/null +++ b/src/components/page/LanguageSelector.tsx @@ -0,0 +1,35 @@ +import React from 'react' +import { Select } from './Select' +import { useTranslation } from 'react-i18next' +import styled from 'styled-components' +import { Colors } from '../../constants/styles' + +const languages = [ + { name: 'EN', code: 'en' }, + { name: 'NL', code: 'nl' }, +] + +export const LanguageSelector = () => { + const { t, i18n } = useTranslation() + + return ( +