Best way to handle localization in NextJS with multiple regions

I am developing a website that will operate in multiple countries, but will offer slightly different features for each country. Additionally, the site for each country should support localization for the user’s desired language. For example, if a user is in France t but have english as their preferred language, they would be routed to the english version of the .fr site.

I have looked into domain based internalization on Next, but it seems like it routes based on language preference and not geolocation. So someone in Spain that prefers French would be routed to the .fr site as opposed to the French version of the .es site, which is not what I want.

At this point, I think the best solution is to keep independent repos for each country, deploy them separately and use sub path routing for each one. This also makes it easier to offer different features based on location. However, it would make it a lot harder to keep all websites synchronized, as I would have to manually update each repo separately.

I am not sure if I am missing another option. Any advice would be greatly appreciated. Thank you!