'Is it possible to have i18n support in nextjs without prefix or subdomain-strategy?

I'm currently developing a website using nextjs for react.

Current localization option:

HTTPs://mywebsite.com/[lang]/productpage.html or HTTPs://mywebsite.[lang]/productpage.html

where the [lang] part is dynamic based upon what locale i am setting.

What i want is to be able to use the following format:

HTTPs://mywebsite.com/[language-productpage].html

Where the name of the page generated and its route is language specific, without having to duplicate all my static pages for each locale...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source