Detecting a user's country to display different currencies
Unanswered
Argente Brun posted this in #help-forum
Argente BrunOP
Hi, I'm working on a website and I want to add a feature to say, if you were in India, a pricing table would automatically display rupees instead of usd. I've been searching the web and it seems possible with Next.js's routing/internalization, but I just wanted to see what other people on the discord thought: is it possible with Next.js? What should I use? Are there any good examples/tutorials out there covering this? Thanks.
4 Replies
@Argente Brun Hi, I'm working on a website and I want to add a feature to say, if you were in India, a pricing table would automatically display rupees instead of usd. I've been searching the web and it seems possible with Next.js's routing/internalization, but I just wanted to see what other people on the discord thought: is it possible with Next.js? What should I use? Are there any good examples/tutorials out there covering this? Thanks.
Yes, internalization is usually the way to go for things like these
@Clown Yes, internalization is usually the way to go for things like these
Argente BrunOP
Does this require any prompts like "can we lose your location" etc. or does it just automatically detect the country?
Here's some basic docs at the topic:
https://nextjs.org/docs/app/building-your-application/routing/internationalization
https://nextjs.org/docs/app/building-your-application/routing/internationalization
Argente BrunOP
Thanks