Open MohammadShehadeh opened 1 year ago
Same problem with getStaticProps. This broke between 13.4.12 -> 13.4.13
the same issue
Same issue if using next/link
next 13.4.19 The problem remains
Just randomly checked next@13.4.20-canary13, that also doesn't work
UPD: it breaks after adding following empty middleware:
import { NextRequest, NextResponse } from "next/server";
export async function middleware(req: NextRequest) {
return;
}
export const config = {
};
Same issue, it is fixed when removing the middleware.
Here is a reproducer https://github.com/meemaw/next-i18n that I think is directly caused due to this bug.
To reproduce:
@Meemaw this looks like a serious bug, I have encountered it when trying to update our codebase from next@13.4.19
to next@13.5.x
.
In my case the bug is reproducible only on the root path /,
others like /some-page
seem to work ok.
unfortunately this is still happening in next@14.0.1
.
the bug is still in the next@14.0.2
.
I have the same problem here, some could fixed it? I'm ussing nextjs 14, and trying with next-transtale import React from 'react' import setLanguage from 'next-translate/setLanguage'
export default function ChangeLanguage() { return ( <button onClick={async () => await setLanguage('en')}>EN ) } this doesn't works too
still not working in next@14.1.0
Verify canary release
Provide environment information
Which example does this report relate to?
Internationalization (i18n) / getServerSideProps / Pages router
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
When transitioning between locales on dynamic routes using
next/router
, the application reverts to the default locale instead of maintaining the selected locale ingetServerSideProps
Expected Behavior
The application should maintain the selected locale when transitioning between locales on dynamic routes using next/router in
getServerSideProps
To Reproduce
next/router
to transition between different locales while on the dynamic route.