You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v4.16.9
Node v18.20.4
System macOS (x64)
Package Manager npm
Output server
Adapter @astrojs/node
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I'm trying to test Astro Internationalization using domains on localhost and I am not able to get it display different pages dependant on the domain. It keeps displaying the default template.
I am testing on my local machine. I have set up my host file with so that I can test different domains
127.0.0.1 test
127.0.0.1 zh.test
My astro configuration looks like this
`
import node from '@astrojs/node';
import { defineConfig } from "astro/config";
When I go to
zh.test:4321 I expect to get the template inside of src/pages/zh/index.astro
test:4321 I expect to get the template inside of src/pages/en/index.astro (the defaultLocale)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I'm trying to test Astro Internationalization using domains on localhost and I am not able to get it display different pages dependant on the domain. It keeps displaying the default template.
I am testing on my local machine. I have set up my host file with so that I can test different domains
My astro configuration looks like this
`
import node from '@astrojs/node';
import { defineConfig } from "astro/config";
export default defineConfig({
site: "http://test",
output: "server", // required, with no prerendered pages
adapter: node({
mode: 'standalone',
}),
i18n: {
defaultLocale: "en",
locales: ["en", "zh"],
routing: {
prefixDefaultLocale: false
},
domains: {
zh: "http://zh.test",
}
}
})
`
My pages look like this
What's the expected result?
When I go to
zh.test:4321 I expect to get the template inside of
src/pages/zh/index.astro
test:4321 I expect to get the template inside of
src/pages/en/index.astro
(the defaultLocale)Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro-uryli9
Participation
The text was updated successfully, but these errors were encountered: