-
-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle anchors correctly #16
Comments
Hi @manniL ! <template>
<section>
<a :href="`#${$t('contactus_anchor')}`">Contact link</a>
<!-- More stuff here -->
<div :id="$t('contactus_anchor')">
Contact content
</div>
</section>
</template> And in your translations files: // en
module.exports = {
contactus_anchor: 'contact-us'
}
// de
module.exports = {
contactus_anchor: 'schreib-uns'
} |
Thanks for the fast answer! |
I know this is closed already, but if someone wants another workaround for this problem, I'm using a
viewGallery() {
let route = this.localePath("story")+"/#gallery"
this.$router.push(route)
} |
I want to use nuxt-i18n to "translate" anchor links (though it might sound weird).
Example config:
If I iterate over all links and use the
localePath
function..the anchor tag isn't resolved correctly. I guess that the problem lies in the export of base routes while ignoring other routes that aren't included in the base routes of Nuxt
The text was updated successfully, but these errors were encountered: