diff --git a/README.md b/README.md
index c48e4da65..acbf93148 100644
--- a/README.md
+++ b/README.md
@@ -39,3 +39,7 @@ All reusable Components (for example avatar) should be done inside the styleguid
``` bash
$ yarn styleguide
```
+
+## Attributions
+
+
diff --git a/components/LanguageSwitch.vue b/components/LanguageSwitch.vue
new file mode 100644
index 000000000..9906c25d5
--- /dev/null
+++ b/components/LanguageSwitch.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
diff --git a/layouts/default.vue b/layouts/default.vue
index 8f2195552..752c4c3d9 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -8,22 +8,7 @@
>
-
-
- Deutsch
-
-
- English
-
-
+
import { mapGetters } from 'vuex'
-import { setTimeout } from 'timers'
+import LanguageSwitch from '~/components/LanguageSwitch'
+
let mouseEnterTimer = null
let mouseLeaveTimer = null
export default {
+ components: {
+ LanguageSwitch
+ },
data() {
return {
isPopoverOpen: false
@@ -121,18 +110,6 @@ export default {
clearTimeout(mouseLeaveTimer)
},
methods: {
- changeLanguage(locale) {
- // TODO: make it a component
- // check if the locale has already been loaded
- if (this.$i18n.localeExists(locale)) {
- this.$i18n.set(locale)
- return
- }
- import(`~/locales/${locale}.json`).then(res => {
- this.$i18n.add(locale, res.default)
- this.$i18n.set(locale)
- })
- },
toggleMenu() {
this.isPopoverOpen = !this.isPopoverOpen
},
@@ -157,3 +134,11 @@ export default {
}
}
+
+
diff --git a/static/img/locale-flags/de.svg b/static/img/locale-flags/de.svg
new file mode 100644
index 000000000..4e508a4b3
--- /dev/null
+++ b/static/img/locale-flags/de.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/static/img/locale-flags/en.svg b/static/img/locale-flags/en.svg
new file mode 100644
index 000000000..89af58847
--- /dev/null
+++ b/static/img/locale-flags/en.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/static/img/locale-flags/fr.svg b/static/img/locale-flags/fr.svg
new file mode 100644
index 000000000..9547d75c7
--- /dev/null
+++ b/static/img/locale-flags/fr.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/static/img/locale-flags/nl.svg b/static/img/locale-flags/nl.svg
new file mode 100644
index 000000000..29a6a0ce3
--- /dev/null
+++ b/static/img/locale-flags/nl.svg
@@ -0,0 +1 @@
+
\ No newline at end of file