nuxt-modules/i18n

How to use localePath() with route params?

Open

#3,004 opened on Jun 29, 2024

View on GitHub
 (11 comments) (4 reactions) (0 assignees)TypeScript (532 forks)github user discovery
good first issuescope: docs

Repository metrics

Stars
 (2,074 stars)
PR merge metrics
 (Avg merge 6d 10h) (74 merged PRs in 30d)

Description

Unfortunately the docs doesnt show how to use localePath() with route params. E.g.:

/products/[id]

How to do link to such a page? I tried localePath('products/' + id) with no success.

EDIT: See my answer below for full explanation

Contributor guide