-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
When setting the prefixDefaultLocale = false, fallback to default is not working at homepage. #10724
Copy link
Copy link
Closed
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)feat: i18nRelated to internalization (scope)Related to internalization (scope)
Description
Astro Info
Astro v4.5.12
Node v20.8.1
System Linux (x64)
Package Manager npm
Output server
Adapter @astrojs/node
Integrations @astrojs/react
@astrojs/vue
@astrojs/tailwind
@astrojs/mdx
@astrojs/partytown
client:eager
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
when setting below options, the fallback for SG homepage is not working, the Location in response is a null string.
i18n: { defaultLocale: "default", locales: [ "default", "fr", ], fallback: { "fr": 'default' }, routing: { prefixDefaultLocale: false } }, trailingSlash: "never"
This is the response,
Request URL: https://astro.avepoint.com/uk Request Method: GET Status Code: 302 Found Remote Address: 10.1.0.182:443 Referrer Policy: strict-origin-when-cross-origin Date: Tue, 09 Apr 2024 07:31:48 GMT Last-Modified: Tuesday, 09-Apr-2024 07:31:48 UTC Location: Referrer-Policy: no-referrer-when-downgrade
What's the expected result?
It's should be fallback to default homepage.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xfj9kv?file=astro.config.mjs
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)feat: i18nRelated to internalization (scope)Related to internalization (scope)