Hotel Booking carries the validated frontend locale through virtual routes and forms. The shared availability form uses a hidden hb_language field in addition to a provider-localized action URL. The query value is defense in depth, not authorization.
Verify the handoff
- Open the Vietnamese
/vi/homepage and select Check availability. - Confirm the action points to
/vi/search-availability/and the request carrieshb_language. - Submit dates and guests, then verify the Search Availability result remains Vietnamese and preserves the criteria.
- Open
/vi/rooms/, switch to English and confirm the destination remains/rooms/, not the homepage. - From an English Booking or Rooms menu item, switch to Vietnamese and verify the matching
/vi/virtual route.
The virtual-route hotfix handles providers that return a target-language homepage when no translated WordPress post exists. Ordinary translated page URLs and external URLs remain provider-authoritative. Confirmation, payment, customer, review, password-reset, nonce and token routes remain locked and do not expose switch URLs.
If a CTA returns to English, inspect the form’s localized action and hidden field before touching the theme. If only custom links are missing, assign the language-specific menu. Never add cookies or a global vendor-language switch as a workaround.
Booking creation stores the validated locale in the immutable booking snapshot; payment return and confirmation use that stored context.