Custom localization in nextJS with TypeScript

28 Views Asked by At

I have an eCommerce multi-lingual website in English and Arabic, built with NextJS and Typescript. I want to achieve the localization as explained below.

mydomain.com/uae-en
mydomain.com/uae-ar
mydomain.com/ksa-en
mydomain.com/ksa-ar
mydomain.com/kwt-en
mydomain.com/kwt-ar

My website is working in 3 countries and each country has separate products. How can I achieve the required localization in nextJS 13.3.4 with TypeScript?

I tried many approaches but failed :(

I tried through chatGPT but didn't get a proper solution.

0

There are 0 best solutions below