A multilingual booking page shows your booking page, widgets and texts in the language of each version of your website. Activate your languages in Beds24, then embed the booking page and widgets with a language parameter.
Table of Contents
- Activate languages
- Embed the booking page in each language
- Create widgets in several languages
- Set the language in WordPress
- Translate the availability calendar text
Activate languages
Steps:
- Go to Settings > Booking Engine > Internationalization.
- Activate the languages you want to use on your booking page.
- Set the default language for your booking page.
Expected result: wherever you can enter your own descriptions, there is a tab for each activated language.
Tip: enter descriptive texts in every language you use. See Languages.
Embed the booking page in each language
On a multilingual website, embed the booking page with a different default language for each language version by adding a language parameter to the URL. Code for a booking page in your default language:
<iframe src ="https://beds24.com/booking2.php?propid=3103&numdisplayed=5&numnight=1&numadult=2-1&referer=iframe/" width="800" height="2000" style="max-width:100%;border:none;overflow:auto;"><p><a href="https://beds24.com/booking2.php?propid=3103&referer=iframe/" title="Book Now">Book Now</a></p></iframe>
For a French booking page, add &lang=fr to the URL:
<iframe src ="https://beds24.com/booking2.php?propid=3103&numdisplayed=5&numnight=1&numadult=2-1&referer=iframe&lang=fr/" width="800" height="2000" style="max-width:100%;border:none;overflow:auto;"><p><a href="https://beds24.com/booking2.php?propid=3103&referer=iframe/" title="Book Now">Book Now</a></p></iframe>
Note: if you use a script to detect the visitor's language, add another script that sets the language parameter as well.
For right-to-left languages (Arabic, Hebrew), add custom CSS to your booking page to change the alignment. See How to use Custom CSS.
Create widgets in several languages
The widget designer in Settings > Booking Engine > Booking Widgets lets you choose a language for each widget. See How to use Widgets.
Set the language in WordPress
In WordPress, add the language parameter to the shortcode, for widgets and for the embedded booking page:
- Default language:
[beds24-embed] - French:
[beds24-embed lang="fr"]
For details, log in to WordPress and go to Settings > Beds24 Online Bookings. See WPML and Wordpress.
Translate the availability calendar text
The availability calendar widget has limited translation options. To translate "Click your arrival date", add this script to the source code of the page that shows the widget:
<script>
$( document ).ready(function() {
$('.b24calendarclickinstruction').html("the new text");
});
</script>
For WordPress, use:
<script>
jQuery( document ).ready(function() {
jQuery('.b24calendarclickinstruction').html("the new text");
});
</script>