Language Selection and Determination

Language Selection and Determination

hotelRSV is translated into the following languages:
-  English
-  Español
-  Italiano
-  Português
-  Français
-  Deutsch
-  русский (Russian)
-  日本人 (Japanese)
-  (Arabic) العربية
-  中国 (Chinese – Zhōngwén )
-  한국어/조선말 (Korean)
-  עִבְרִית‎ (Hebrew) (coming soon)
Notes
hotelRSV will show the user the correct language automatically based on the language of the browser. Therefore, it is not necessary to perform any additional work by the webmaster.

Programmatic Language Determination (Optional)


It is possible to select at a global level (for all Action items on the page) and at a singular level (for each Booking Button or Action Item). The language scheme works in cascade, determining the language of the application according to the following scheme:
-Singular Level First take the language in the hotelrsv-lang="XX" attribute of the action item (booking button), if it is not declared, then go to the global level.
-Global Level Script Language in the <head> or <footer> (depending on where you have localized the hotelRSV library script): <script> var hotelrsv_lang = "browser_lang";</script>.
This means that the application will first take into account the language determined at the singular level and in case it is not declared, it will take the global one by default. In this way, the same page can have action elements in different languages, allowing to programmatically choose the desired language.

Declaring the Global Variable

  1. <!-- HOTELRSV Language Selection -->
  2. <script> var hotelrsv_lang = "browser_lang";</script> <!-- OPTIONAL -->
  3. <!-- END HOTELRSV Language Selection -->
Notes
The var hotelrsv_lang variable at the level is not mandatory, however it is the one that allows you to determine globally (for that page) the preferred language of the Web App. If the variable is not declared hotelRSV will automatically take the browser language, if hotelRSV is not available in the browser language, hotelRSV will run in English.

Valid Language Code Values



Code
Description
Global Example: <head> or <footer>
Singular Level Example for Action Items
browser_lang
It will take the default language of the browser.
Spanish if it is Spanish, English for all other languages.
Info
<script var hotelrsv_lang = "browser_lang";>
Info
<button class="rsv-app-launcher" data-hotelrsv-lang="browser_lang">
or
Info
<button class="rsv-app-launcher">
Since without declaring the attribute data-hotelrsv-lang it will take the default attribute of the script globally.
en, es, it, de, pt, fr, ru, jp, ar, zh, ko
Use two-character ISO 3166-2 language codes.
Info
<script var hotelrsv_lang = "de";>
Info
<a class="rsv-app-launcher" data-hotelrsv-lang="de">

It is possible to create several action buttons with different languages within the same page (indicating them with the attribute data-hotelrsv-lang). However, only one language can be specified globally (remember that each page must have its own set of instructions).

    • Related Articles

    • Selection, Determination of Currency

      HotelRSV is a multi-currency hotel booking engine and allows you to sell rooms with rates in multiple currencies. If your payment processor allows it, you can even charge in different currencies. In HotelRSV, the Currencies are configured in the ...
    • Rate Mixer: Rate Selection in Overlapping Seasons with Overlapping Dates

      The Rate Mixer of HotelRSV allows the hotelier to configure HotelRSV to automatically select the lowest (cheapest) or highest (most expensive) rate depending on the configuration of the parameter Rsv_Season_Sel_Rates. Rsv_Season_Sel_Rates: Selecting ...
    • CTA: HTML Booking Buttons - HTML Booking Element Generator

      HTML Elements, Booking Buttons - Calls to Action within the Web Page If you have already installed hotelrsv.js (see installation guide), just add the class class="rsv-app-launcher rsv-mobile-launcher" to any HTML element in your page and that's it, ...
    • Installation in WordPress – Plugin

      The new hotelRSV plugin for WordPress allows you to install with a single click the hotelrsv.js libraries and perform basic configurations such as application language. Avoid Errors! Avoid duplicate libraries or installation. If you use the WordPress ...
    • CTA: URLs, Direct Booking Links - Booking Link Generator

      This guide is oriented to create "incoming links" to be used in Newsletter (mail-list), social media sharing, chat, and other forms of communication with Links so that the guest can directly reach the offer you want to communicate, reducing steps and ...