Support » Plugin: VikBooking Hotel Booking Engine & PMS » Shortcode language issue

  • Resolved alarralde


    Hi, I installed the free version of the plugin in a wordpress site to see what can it do before buying it.

    What I am trying to get is a page where the user can change the language beetwen english and spanish and all the content changes its language, vik booking forms included.

    I downloaded some translation files (es-ES), installed them in my languages folder and it worked nice, now I see the plugin in that language.

    The problem is:

    * If I use a shortcode like [vikbooking roomid=”1″ view=”roomdetails” lang=”en-
    US”], the view is still appearing in spanish. I guess the attribute lang does
    not work.

    What I have tried:

    * I have changed the lang value to *.
    * I have created new shortcodes, one for spanish an another for english.
    * I have created a new shortcode with all languages option selected.

    Is it possible to change beetwen languages?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have noticed that the lang attribute works in order to show translations that I created like a description in other language or the name of the room, but the text of booking button, dates, etc are in spanish even if I use the en-US language in the shortcode.

    Plugin Author e4jvikwp


    The language used for the various translation strings (booking buttons, labels, “Book Now” etc..) is taken directly by WordPress, which loads the apposite .PO and .MO files for the plugin Vik Booking.
    Instead, the language attribute you see in the Shortcode is used by Vik Booking to translate internal contents that you created, such as the names or the descriptions of your rooms.
    You should use the wp-admin page “Global – Translations” in Vik Booking and look at the first language tab all the way to the left: that’s your website default language according to the WordPress settings. All translation strings will be read from the .PO and .MO files for that language, Spanish in your case.
    You should use a third party plugin to control the active language for the website, and to let customers switch to another language. All the button texts, labels and other translation strings will change by themselves, once the WordPress framework will load the apposite .PO and .MO files for the selected and active language.
    We’ve seen many of our clients using either Polylang or WPML, but I guess any other language plugin would work to let the customers switch from a language to another.
    Right now you are only relying on the internal translation system of Vik Booking through the use of the apposite language attribute we place in the Shortcodes. However, the active language for the front-end website needs to be set by another plugin if you need to offer multiple languages. Then, you can use the various Shortcodes to properly create menu items in the desired language according to which one is active. For this reason, you need a third party plugin to set up the multi-language functions for your website.
    One important thing to keep in mind is to create all of your contents (names and descriptions of the rooms, rate plans etc..) in the default website language. If that’s Spanish, then you should write the contents with Vik Booking in Spanish. As previously discussed, the default website language is displayed in the first tab to the left of the page “Global – Translations” in Vik Booking. Then with this function you can translate the contents into any other language installed.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode language issue’ is closed to new replies.