diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3c621f1..96d3039 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,8 +19,8 @@ jobs: php-version: '8.2' tools: 'composer' - - name: Composer install - run: composer install + # - name: Composer install + # run: composer install - name: NPM install run: npm install && npm run build diff --git a/resources/js/Components/LanguageSwitcher.vue b/resources/js/Components/LanguageSwitcher.vue index 214ddbe..59ca26d 100644 --- a/resources/js/Components/LanguageSwitcher.vue +++ b/resources/js/Components/LanguageSwitcher.vue @@ -20,15 +20,16 @@ @@ -39,7 +40,8 @@ import { computed } from 'vue'; import { router as inertiaRouter } from '@inertiajs/vue3'; import Dropdown from '@/Components/Forms/Dropdown.vue'; -import { setLocale } from '@/i18n'; +import DropdownLink from '@/Components/DropdownLink.vue'; +import i18n, { setLocale } from '@/i18n'; const props = defineProps(['currentLocale']); @@ -54,6 +56,11 @@ const currentLanguage = computed(() => { return languages.find(lang => lang.code === props.currentLocale); }); +const getURL = (lang) => { + const currentUrl = new URL(window.location.href); + return currentUrl.pathname.replace(`/${props.currentLocale}`, `/${lang.code}`); +}; + async function changeLanguage(lang) { const currentUrl = new URL(window.location.href);