Note
Language redirects break shared links
Detecting the browser language and redirecting looks like a courtesy. In practice it swaps the page someone chose to share, and the person who sent the link never finds out.
You send someone a link to the English version of your site. Their browser is set to Portuguese, the site detects it and helps: it opens the Portuguese version. They never see the page you chose to send. And you never find out, because for you the link always worked.
That is the failure mode of redirecting on Accept-Language, and it is invisible by nature: whoever shares a link does not see what the receiver saw. Crawlers hit the same problem at scale. A search bot arrives with some header and indexes the version the server picked, not the one the URL names.
On this site the rule is: language comes from the path, and only from the path. Portuguese at the root, English under /en. Not a single line of code reads Accept-Language. Switching languages is the visitor's gesture, through a control visible on every page.
The cost is real and I accepted it: an international visitor landing on the root gets Portuguese and pays one click to switch. I prefer that click over a link that opens in the wrong place.
The part that usually goes missing from this conversation: the decision became a check. A test sweeps the code and fails if an Accept-Language read or a middleware file shows up, the only two places such a redirect could come from in Next. An architecture decision that never becomes a test dies in the first hurried refactor.