diff --git a/src/components/Footer.vue b/src/components/Footer.vue index 094bb6c..db3a7b9 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -3,12 +3,23 @@ import IconGithub from '@/components/icons/IconGithub.vue' import IconHeart from '@/components/icons/IconHeart.vue' import IconTelegram from '@/components/icons/IconTelegram.vue' import IconTwitch from '@/components/icons/IconTwitch.vue' +import { useLocalStorage } from '@vueuse/core' +import { useI18n } from 'vue-i18n' + +const { locale } = useI18n() + +let localValue +const switchLang = () => { + locale.value === 'en' ? (locale.value = 'ru') : (locale.value = 'en') + useLocalStorage('valoryLocale', locale.value) + localValue = locale.value +} diff --git a/src/i18n.js b/src/i18n.js new file mode 100644 index 0000000..35faf40 --- /dev/null +++ b/src/i18n.js @@ -0,0 +1,12 @@ +import messages from '@intlify/unplugin-vue-i18n/messages' +import { useLocalStorage } from '@vueuse/core' +import { createI18n } from 'vue-i18n' + +const locale = useLocalStorage('valoryLocale', 'en') + +export const i18n = createI18n({ + legacy: false, + locale: locale.value, + fallbackLocale: 'en', + messages +}) diff --git a/src/locales/en.json b/src/locales/en.json new file mode 100644 index 0000000..0fac184 --- /dev/null +++ b/src/locales/en.json @@ -0,0 +1,16 @@ +{ + "landing": { + "pretitle": "STREAM OVERLAY 2.0", + "description": "Grab your audience's attention with real-time VALORANT stats!", + "features": { + "first": "Customize your overlay according to your stream.", + "second": "It's absolutely FREE! There is support for many popular streaming programs like OBS and others.", + "third": "Setup once and everything will always work!" + }, + "buttons": { + "first": "How does it work?", + "second": "Create your overlay" + }, + "footer": "Made with" + } +} diff --git a/src/locales/ru.json b/src/locales/ru.json new file mode 100644 index 0000000..3a5ae9f --- /dev/null +++ b/src/locales/ru.json @@ -0,0 +1,16 @@ +{ + "landing": { + "pretitle": "ОВЕРЛЕЙ ДЛЯ СТРИМА 2.0", + "description": "Привлекайте внимание аудитории статистикой VALORANT!", + "features": { + "first": "Кастомизируйте свой оверлей в соответствии с Вашим стримом.", + "second": "Это абсолютно бесплатно! Есть поддержка для многих популярных стриминг-программ, например OBS и другие.", + "third": "Установите один раз и все будет работать как по маслу!" + }, + "buttons": { + "first": "Как это работает?", + "second": "Создайте свой оверлей" + }, + "footer": "Сделано с" + } +} diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index aae34b2..0c298f3 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -11,32 +11,31 @@ import Button from '@/components/ui/Button.vue'
-

STREAM OVERLAY 2.0

+

{{ $t('landing.pretitle') }}

-

Catch your audience's attention with real-time VALORANT stats!

+

{{ $t('landing.description') }}

-

Customize your overlay according to your stream.

+

{{ $t('landing.features.first') }}

- It's absolutely FREE! There is support for many popular streaming programs like OBS - and others. + {{ $t('landing.features.second') }}

-

Setup once and everything will always work!

+

{{ $t('landing.features.third') }}

- - + +