Which project does this relate to?
Start
Describe the bug
Locale redirect bug: navigating to /de immediately redirects to /en (cannot switch language)
Description
Repro repo
Problem
When I try to switch the app language to German (/de), it immediately redirects back to English (/en). Even if I manually type /de in the URL, it redirects to /en, so I can’t use the de locale at all.
Steps to reproduce
- Start the app (e.g.
pnpm dev).
- Open
http://localhost:3000/de (or click a language switcher button that navigates/sets locale to de).
- Observe the URL changes back to
/en immediately.
Expected behavior
- Visiting
/de stays on /de.
- The UI renders German messages and
getLocale() (or equivalent) resolves to de.
Actual behavior
/de always redirects to /en immediately.
- Language cannot be changed to German.
Relevant code / suspicion
- Suspicion: when running with Cloudflare + Vite dev,
src/server.ts does not seem to be executed, so the Paraglide middleware (paraglideMiddleware) never runs.
Environment
- OS: macOS
- Date: 2026-01-02
- Package manager: pnpm
- Dev server: Vite / TanStack Start + Cloudflare
- Locales configured:
en, de
Extra notes
- This happens even when the URL already includes
/de, so it’s not just missing-locale auto-redirect from / → /en.
Your Example Website or App
https://github.com/luthfi-hh/tanstack-start-hell
Steps to Reproduce the Bug or Issue
- Start the app (e.g.
pnpm dev).
- Open
http://localhost:3000/de (or click a language switcher button that navigates/sets locale to de).
- Observe the URL changes back to
/en immediately.
Expected behavior
Visiting /de stays on /de.
The UI renders German messages and getLocale() (or equivalent) resolves to de.
Screenshots or Videos
No response
Platform
Additional context
No response
Which project does this relate to?
Start
Describe the bug
Locale redirect bug: navigating to
/deimmediately redirects to/en(cannot switch language)Description
Repro repo
Problem
When I try to switch the app language to German (
/de), it immediately redirects back to English (/en). Even if I manually type/dein the URL, it redirects to/en, so I can’t use thedelocale at all.Steps to reproduce
pnpm dev).http://localhost:3000/de(or click a language switcher button that navigates/sets locale tode)./enimmediately.Expected behavior
/destays on/de.getLocale()(or equivalent) resolves tode.Actual behavior
/dealways redirects to/enimmediately.Relevant code / suspicion
src/server.tsdoes not seem to be executed, so the Paraglide middleware (paraglideMiddleware) never runs.Environment
en,deExtra notes
/de, so it’s not just missing-locale auto-redirect from/→/en.Your Example Website or App
https://github.com/luthfi-hh/tanstack-start-hell
Steps to Reproduce the Bug or Issue
pnpm dev).http://localhost:3000/de(or click a language switcher button that navigates/sets locale tode)./enimmediately.Expected behavior
Visiting /de stays on /de.
The UI renders German messages and getLocale() (or equivalent) resolves to de.
Screenshots or Videos
No response
Platform
Additional context
No response