Skip to content

Commit

Permalink
fixed switching issue with languages
Browse files Browse the repository at this point in the history
  • Loading branch information
athi committed Jan 14, 2025
1 parent bdccae4 commit 8d9c7a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions components/GlobalFooter.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="foot py-7 additional-height">
<h3 v-for="post in posts" :key="post.to" class="my-3">
<nuxt-link :to="post.name">
<nuxt-link :to="localePath(post.name)">
{{ $t(post.text) }}
</nuxt-link>
</h3>
Expand Down Expand Up @@ -38,11 +38,11 @@

<h3 class="mt-5" style="height: 70px">
&copy; {{ new Date().getFullYear() }} -
<nuxt-link to="/about">About</nuxt-link>
<nuxt-link :to="localePath('/about')">About</nuxt-link>
-
<nuxt-link to="/impressum">Imprint</nuxt-link>
<nuxt-link :to="localePath('/impressum')">Imprint</nuxt-link>
-
<nuxt-link to="/subscribe">Subscriptions</nuxt-link>
<nuxt-link :to="localePath('/subscribe')">Subscriptions</nuxt-link>
</h3>
</v-container>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/GlobalHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-container class="pl-md-16">
<v-card color="#21a68d" flat tile>
<v-card-actions>
<nuxt-link to="/">
<nuxt-link :to="localePath('/')">
<h1 style="color: black; font-size: 2em">
<img
alt="WhatsAnalyze Logo"
Expand Down
3 changes: 2 additions & 1 deletion pages/whatsapp-wrapped-year-review.vue
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ export default {
},
methods: {
goToHome() {
this.$router.push("/"); // Navigate to the home page
const homePath = this.localePath("index"); // Dynamically generate the localized path for the home page
this.$router.push(homePath);
},
},
};
Expand Down

0 comments on commit 8d9c7a4

Please sign in to comment.