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(document).ready(function(){
    jQuery('.wpbc_lang_field').val( wpbc_active_locale );
 });
</script>

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

There are 2 types of Booking Calendar translations.

1) One list of translations located at WordPress repository. Please note, these translations at your website should be located at: "../wp-content/languages/plugins/" folder.

2) Another list of translations located at the Booking Calendar website. You can download the original PO translations files from here. Please note, these translations at your website should be located at: "../wp-content/plugins/{Booking Calendar Folder}/languages/" folder.

By default Booking Calendar plugin try to use translations from "../wp-content/languages/plugins/",
if failed (not exist), then try to use translations from "../wp-content/plugins/{Booking Calendar Folder}/languages/" folder.
This behavior is possible to change at the Booking > Settings General page in the Translation section.

You can check instruction how to make or update local plugin translation files at this page.

Translations available in paid versions of Booking Calendar:

German 100% [ 2151 / 2151 ], fuzzy 0, not translated 0
Hungarian 100% [ 2146 / 2146 ], fuzzy 0, not translated 0
French (France) 99.15% [ 2105 / 2123 ], fuzzy 17, not translated 1
Greek 89.22% [ 1878 / 2105 ], fuzzy 140, not translated 87
Turkish 88.03% [ 1853 / 2105 ], fuzzy 158, not translated 94
Portuguese (Brazil) 86.8% [ 1835 / 2114 ], fuzzy 177, not translated 102
Italian 85.7% [ 1804 / 2105 ], fuzzy 49, not translated 252
Romanian 79.57% [ 1675 / 2105 ], fuzzy 273, not translated 157
Arabic 79.24% [ 1668 / 2105 ], fuzzy 279, not translated 158
Finnish 79.1% [ 1665 / 2105 ], fuzzy 285, not translated 155
Spanish (Mexico) 79% [ 1663 / 2105 ], fuzzy 289, not translated 153
Dutch 78.62% [ 1662 / 2114 ], fuzzy 303, not translated 149
Swedish 78.48% [ 1652 / 2105 ], fuzzy 290, not translated 163
Spanish (Spain) 78.38% [ 1650 / 2105 ], fuzzy 298, not translated 157
Norwegian (Bokmål) 78.05% [ 1643 / 2105 ], fuzzy 301, not translated 161
Polish 77.81% [ 1638 / 2105 ], fuzzy 300, not translated 167
Slovenian 77.01% [ 1621 / 2105 ], fuzzy 311, not translated 173
Danish 73.25% [ 1542 / 2105 ], fuzzy 362, not translated 201
Bulgarian 73.21% [ 1541 / 2105 ], fuzzy 357, not translated 207
Chinese (Taiwan) 71.5% [ 1505 / 2105 ], fuzzy 409, not translated 191
Russian 69.91% [ 1478 / 2114 ], fuzzy 408, not translated 228
Portuguese (Portugal) 69.55% [ 1464 / 2105 ], fuzzy 411, not translated 230
Galician 69.45% [ 1462 / 2105 ], fuzzy 418, not translated 225
Thai 69.36% [ 1460 / 2105 ], fuzzy 409, not translated 236
Hebrew 67.22% [ 1415 / 2105 ], fuzzy 417, not translated 273
Chinese (China) 66.6% [ 1402 / 2105 ], fuzzy 422, not translated 281
Ukrainian 66.37% [ 1403 / 2114 ], fuzzy 434, not translated 277
Croatian 57.01% [ 1200 / 2105 ], fuzzy 409, not translated 496
Slovak 56.96% [ 1199 / 2105 ], fuzzy 412, not translated 494
Czech 56.91% [ 1198 / 2105 ], fuzzy 409, not translated 498
Catalan 56.77% [ 1195 / 2105 ], fuzzy 413, not translated 497

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 depends on the active locale of the site.

Booking Calendar supports WPML and Polylang plugins for dynamic changing of website locale (language).

General Usage:
[lang=LOCALE] - start a new translation section in a 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 réservation.
-

Important!
Please note, English language is the default language in the 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:

[calendar]
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"]
[lang=fr_FR]
[calendar]
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 info@wpbookingcalendar.com and we will add them to the next release of plugin. Thank you.