-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The demo app with next 13 not redirect automatically for locale. #237
Comments
Hey @DonikaV and thank you for the bug report! Do you know the There's currently a small bug in the middleware in the stable release, where "de-DE" is not resolved to "de", but instead a fallback to "en" is used. If you use the "de" locale though, the middleware works: curl 'https://csb-k2ien9-7ytkomg4x-amann.vercel.app' -H 'accept-language: de;q=0.8'
Redirecting to /de (307) In Thanks again! |
Syncs various improvements from #149 to the main branch. **Features** - Add domain-based routing for middleware - Add `localePrefix` option for middleware - Add `localeDetection: false` flag for middleware - Set alternate links in middleware (and add opt-out via `alternateLinks: false`) - `NextIntlClientProvider` now accepts `now` as an ISO 8601 date string additionally **Bugfixes** - Handle locale subtags correctly when negotiating a locale in the middleware (e.g. `de-DE` → `de` when only `de` is configured) **Deprecations** - Deprecate `import {createIntlMiddleware} from 'next-intl/server'` in favor of `import createMiddleware from 'next-intl/middleware'` - Deprecate `import {NextIntlClientProvider} from 'next-intl/client'` in favour of `import {NextIntlClientProvider} from 'next-intl'`. As part of this, add a matcher (see the updated docs). **Docs** - Add docs for new features - Middleware should only be applied for localized pages **Internal changes** - Clean up examples - Use latest metadata API from Next.js - Upgrade Next.js - Add sitemap for website - Add docs for new features Closes #237
Syncs various improvements from amannn#149 to the main branch. **Features** - Add domain-based routing for middleware - Add `localePrefix` option for middleware - Add `localeDetection: false` flag for middleware - Set alternate links in middleware (and add opt-out via `alternateLinks: false`) - `NextIntlClientProvider` now accepts `now` as an ISO 8601 date string additionally **Bugfixes** - Handle locale subtags correctly when negotiating a locale in the middleware (e.g. `de-DE` → `de` when only `de` is configured) **Deprecations** - Deprecate `import {createIntlMiddleware} from 'next-intl/server'` in favor of `import createMiddleware from 'next-intl/middleware'` - Deprecate `import {NextIntlClientProvider} from 'next-intl/client'` in favour of `import {NextIntlClientProvider} from 'next-intl'`. As part of this, add a matcher (see the updated docs). **Docs** - Add docs for new features - Middleware should only be applied for localized pages **Internal changes** - Clean up examples - Use latest metadata API from Next.js - Upgrade Next.js - Add sitemap for website - Add docs for new features Closes amannn#237
Description
Hey i am trying to follow this demo app
https://github.com/amannn/next-intl/tree/main/packages/example-next-13
The point is that in my app and in demo page https://csb-k2ien9-7ytkomg4x-amann.vercel.app/en
If you change Language in Chrome settings for example to German, it will open /en anyway. Same for other Languages.
so this middleware doesn't work?
Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://github.com/amannn/next-intl/tree/main/packages/example-next-13
Reproduction description
Steps to reproduce:
Expected behaviour
See another language in domain
for example
/es
The text was updated successfully, but these errors were encountered: