NextJs sub-path routing for country/language

Viewed 39

I have a multi-country shop that I'm rewriting in NextJs - my issue is that while I can add language sub-path routing using the recommended solutions, I can't find a good way to add both country and language for sub-path, like:

www.website.com/countryCode/languageCode/category/...

www.website.com/de/en/category...

I need to have both the countryCode and the languageCode in the url because the server returns different responses based on the user's country, like various products or stock not being available in other countries, etc.

What would be a good way to achieve this country/language internationalization subpath?

Thanks!

0 Answers
Related