Skip to documentation content

Multilingual Sites

Keep language on booking routes and forms

Verify language-prefixed Rooms and Search Availability routes, hidden hb_language handoff and CTA submission continuity across a booking journey.

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

  1. Open the Vietnamese /vi/ homepage and select Check availability.
  2. Confirm the action points to /vi/search-availability/ and the request carries hb_language.
  3. Submit dates and guests, then verify the Search Availability result remains Vietnamese and preserves the criteria.
  4. Open /vi/rooms/, switch to English and confirm the destination remains /rooms/, not the homepage.
  5. 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.

Was this article helpful?

Your feedback helps us improve the documentation.