rsnext/test/integration/i18n-support/pages/gsp
JJ Kasper 7b6a61a750
Ensure correct locale is used for non-prefixed path (#18708)
When visiting a non-locale prefixed path (`/hello` instead of `/fr/hello`) we don't trigger locale redirects currently so if another locale is matched we need to ensure this is reset to the `defaultLocale` for rendering to prevent a mis-match on the client and the server.

This also fixes hydration errors from occurring with `asPath` for `getServerSideProps` pages due to `normalizeLocalePath` expecting only a pathname and `asPath` containing `hash` and `query values also. 

Fixes: https://github.com/vercel/next.js/issues/18337
Fixes: https://github.com/vercel/next.js/issues/18510
2020-11-02 23:00:41 +00:00
..
fallback Ensure correct locale is used for non-prefixed path (#18708) 2020-11-02 23:00:41 +00:00
no-fallback Ensure correct locale is used for non-prefixed path (#18708) 2020-11-02 23:00:41 +00:00
index.js Expose configured default locale in GS(S)P methods (#18216) 2020-10-27 05:43:15 -04:00