How to get active locale (language) of the page, from where visitor submit booking?

On the Booking Listing page exist ability to change language (locale) of emails, that will send to visitor during approving or declining of the booking. But how to detect language/locale of webpage, from where visitor submit the booking.
Here is instruction how to do this.
Please open the Booking > Settings > Fields page and add to the booking form this shortcode and JavaScript code:

<div style="display:none;"> Active Language: [text active_language class:wpbc_lang_field]</div>
<script type="text/javascript">
    jQuery('.wpbc_lang_field').val( wpbc_active_locale );

Its will add to your booking form new field [active_language] and JavaScript for auto-inserting active locale into this field. Please note, this field is not visible for visitors, because of this CSS: style="display:none;"

Also you will be need to add to the "Content of booking fields data" form (its at the bottom of Booking > Settings > Fields page) this shortcode:

<strong>Active Language</strong>:<span class="fieldvalue">[active_language]</span>

For showing this field at the Booking Listing page.

Available translations for paid versions and progress of translation

You can download the original translations files from here. You can check instruction how to make or update translations files at this page.

Translations available in paid versions of Booking Calendar:

  • English
  • Swedish [99% Completed]
  • Norwegian [98% Completed]
  • Spanish [98% Completed]
  • German [98% Completed]
  • French [98% Completed]
  • Arabic [98% Completed]
  • Dutch [98% Completed]
  • Polish [98% Completed]
  • Slovenian [97% Completed]
  • Brazilian Portuguese [98% Completed]
  • Hungarian [97% Completed]
  • Romanian [96% Completed]
  • Italian [94% Completed]
  • Finnish [94% Completed]
  • Danish [92% Completed]
  • Greek [92% Completed]
  • Bulgarian [92% Completed]
  • Turkish [92% Completed]
  • Chinese (Taiwan) [90% Completed]
  • Russian [88% Completed]
  • Portugal [87% Completed]
  • Galician (Spanish) [87% Completed]
  • Thai [87% Completed]
  • Hebrew [85% Completed]
  • Chinese [84% Completed]
  • Ukrainian [84% Completed]
  • Czech [72% Completed]
  • Slovak [72% Completed]
  • Croatian [72% Completed]
  • Catalan [71% Completed]
  • Belorussian [9% Completed]

Different Languages on the same website

Paid versions of Booking Calendar support configuration in different languages of the booking form, email templates and some other text options in the settings . The active language of the booking form is depending from the active locale of the site.

Booking Calendar is supported WPML and qTranslate plugins for dynamic changing of website locale (language).

General Usage:
[lang=LOCALE] - start new translation section in specific language, where LOCALE - locale of the translation.

Example of English and French translation of "Thank you" message:

Thank you for your booking.[lang=fr_FR]Je vous remercie de votre reservation.

Please note, English language is default language in Booking Calendar plugin. You need to start with English section (without [lang=...] shortcode at the top of form), and then continue with all other language sections divided by shortcode [lang=LOCALE], where LOCALE its locale of specific language, like de_DE, or es_ES, etc...

Of course you can have more than 2 language sections.

Example of configuration booking form in English and French languages at the Booking > Settings > Fields page:

First Name (required): [text* name]
Last Name (required): [text* secondname]
Email (required): [email* email]
Visitors: [select visitors "1" "2" "3" "4"]
Details: [textarea details]
[submit "Send"]
Prénom (obligatoire): [text* name]
Deuxième prénom (requis) [text* secondname]
Email (obligatoire) [email* email]
Visiteurs : [select visitors "1" "2" "3" "4"]
Détails : [textarea details]
[submit "Envoyer"]

In the same way, you can configure the email templates on the Booking > Settings > Emails page and search form on the Booking > Settings > Search page, etc..

How to make translation of plugin?

  1. Before making translation of wordpress plugin, you need to have Poedit program. You can download it from here. Its completly free.

    You can download the original translations files from here.

  2. Start Poedit program.
  3. Select File -> New catalog from POT file from menu and select POT file for translation usually its inside of languages folder.
  4. Type description of your translation.
  5. Enter The name of PO file.
    Name of file consist from 2 parts:
    1st part its the filename of the plugin (in our situation its "booking"),
    2nd part its the Locale (for Spanish translation: "es_ES").
    So we will have name "booking-es_ES.po".
  6. Save file to the "languages" folder of plugin.
  7. Make translation.
  8. If you find in translation "%s" symbol you should leave it at the same place as at original translation line.
  9. Please be sure that you do not set specific translation line as "Fuzzy". You can check it at the "Edit menu" - "Translation is fuzzy" (Ctrl + U)
  10. Save file after translation.
  11. If you make translation, you can send this translation files (*.po, *.mo) to and we will add them to the next release of plugin. Thank you.