Skip to documentation content

Multilingual Sites

Configure WPML or Polylang with Hotel Booking

Connect an optional WPML or Polylang provider, assign language menus and verify localized Hotel Booking routes without hard-coding vendors in the theme.

Hotel Booking integrates with WPML or Polylang through optional provider adapters. Install and configure the multilingual plugin according to its own documentation, then let Free Core resolve the locale and navigation contract. Do not add provider calls to Aurelia templates.

Configure the provider

  1. Add the required languages and choose the default language in WPML or Polylang.
  2. Translate the WordPress pages used for Home, Booking, Rooms, My Bookings, Contact and Privacy Policy where your site uses page translations.
  3. Create a primary menu for each language. Include localized page items and custom links for virtual /rooms/ and /search-availability/ routes.
  4. Assign each menu to the matching language in the provider’s menu settings.
  5. Open the frontend and confirm the language switcher lists the expected labels and target URLs.

The public facade remains hotel_booking()->languages(). Provider order, current state and validated URLs come from Core. A provider error falls back to native WordPress behavior rather than breaking booking pages. A single-language state is valid when no multilingual router is available.

Verify virtual routes

Switch on /vi/rooms/ and /vi/search-availability/, then submit the date form. The hb_language value and provider-localized route must persist. If a provider returns its translated homepage for a virtual route, the narrow Core hotfix rebuilds the same Rooms or Search Availability path. Sensitive confirmation and payment URLs remain locked.

If custom links disappear in one language, inspect that language’s menu assignment before changing theme code. Every language-specific menu should be assigned before frontend regression. See language navigation contract.

Was this article helpful?

Your feedback helps us improve the documentation.