Navigate using Link on Next-intl ?
Answered
West African Lion posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
West African LionOP
Hey guys, im struggling on how to use the current language to navigate dynamiclay through my app.
Can't use ${pathname} on Link, any ideas ?
Can't use ${pathname} on Link, any ideas ?
``
import { useRouter, locales, localePrefix } from "../navigation";
import { useParams } from "next/navigation";
export default function Navigation() {
const params = useParams();
console.log(params);
console.log(locales);
console.log(localePrefix);
// const params = useParams();
// console.log(params);
return (
<>
<div className=" h-32 w-full flex lg:bg-white justify-between lg:justify-around bg-black lg:pr-12 overflow-y-hidden">
<div className="w-full h-full hidden lg:flex justify-evenly">
<div className="flex items-center w-5/12">
<div className="flex text-xl w-full justify-evenly font-light">
<Link href="/">
<span>Home</span>
</Link>
<Link href={`/${params}/services` }> // Here //
<span>Services</span>
</Link>
<Link href="/about">
<span>About</span>
</Link>
</div>
`7 Replies
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
params is an object. Maybe params.lang?
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
West African LionOP
I get this
![Image](https://cdn.discordapp.com/attachments/1188798809518641202/1189195687276064878/Screenshot_2023-12-26_at_14.18.56.png?ex=659d47ca&is=658ad2ca&hm=e786869f721f20c099d854ba3bfff1b4eacc99c4cdfd82384262b4f0529e56ad&)
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
yes params is an object
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
West African LionOP
Yeah
It worked
Thanks men !!
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
np