diff --git a/nuxt/components/IzborJezika.vue b/nuxt/components/IzborJezika.vue new file mode 100644 index 0000000..83554c2 --- /dev/null +++ b/nuxt/components/IzborJezika.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/nuxt/lang/en-US.json b/nuxt/lang/en-US.json new file mode 100644 index 0000000..1010d29 --- /dev/null +++ b/nuxt/lang/en-US.json @@ -0,0 +1,4 @@ +{ + "domov": "home", + "jugofuturizem": "yugofuturism" +} diff --git a/nuxt/lang/en.json b/nuxt/lang/en.json new file mode 100644 index 0000000..1010d29 --- /dev/null +++ b/nuxt/lang/en.json @@ -0,0 +1,4 @@ +{ + "domov": "home", + "jugofuturizem": "yugofuturism" +} diff --git a/nuxt/lang/hr.json b/nuxt/lang/hr.json new file mode 100644 index 0000000..172c61a --- /dev/null +++ b/nuxt/lang/hr.json @@ -0,0 +1,3 @@ +{ + "jugofuturizem": "jugofuturizem" +} diff --git a/nuxt/lang/si.json b/nuxt/lang/si.json new file mode 100644 index 0000000..172c61a --- /dev/null +++ b/nuxt/lang/si.json @@ -0,0 +1,3 @@ +{ + "jugofuturizem": "jugofuturizem" +} diff --git a/nuxt/public/images/jezik_en.png b/nuxt/public/images/jezik_en.png new file mode 100644 index 0000000..a52a3ea Binary files /dev/null and b/nuxt/public/images/jezik_en.png differ diff --git a/nuxt/public/images/jezik_hr.png b/nuxt/public/images/jezik_hr.png new file mode 100644 index 0000000..bba3a3a Binary files /dev/null and b/nuxt/public/images/jezik_hr.png differ diff --git a/nuxt/public/images/jezik_si.png b/nuxt/public/images/jezik_si.png new file mode 100644 index 0000000..0369442 Binary files /dev/null and b/nuxt/public/images/jezik_si.png differ diff --git a/nuxt/stores/nastavitve.js b/nuxt/stores/nastavitve.js new file mode 100644 index 0000000..c51f42b --- /dev/null +++ b/nuxt/stores/nastavitve.js @@ -0,0 +1,19 @@ +export const useNastavitveStore = defineStore('nastavitve', { + state: () => ({ + izbraniJezik: 'hr', + mozniJeziki: { + si: 'Slovensko', + hr: 'Hrvatski', + en: 'English' + } + }), + actions: { + izberiJezik(jezik) { + if (Object.keys(this.mozniJeziki).indexOf(jezik) >= 0) { + this.izbraniJezik = jezik + console.log(useNuxtApp().$i18n.availableLocales) + //useNuxtApp().$i18n.setLocale(jezik) + } + } + } +})