Title: Shortcode language issue
Last modified: April 30, 2019

---

# Shortcode language issue

 *  Resolved [alarralde](https://wordpress.org/support/users/alarralde/)
 * (@alarralde)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/shortcode-language-issue/)
 * 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)

 *  Thread Starter [alarralde](https://wordpress.org/support/users/alarralde/)
 * (@alarralde)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/shortcode-language-issue/#post-11481379)
 * 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](https://wordpress.org/support/users/e4jvikwp/)
 * (@e4jvikwp)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/shortcode-language-issue/#post-11481677)
 * Hi,
    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.
 *  Thread Starter [alarralde](https://wordpress.org/support/users/alarralde/)
 * (@alarralde)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/shortcode-language-issue/#post-11481704)
 * Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Shortcode language issue’ is closed to new replies.

 * ![](https://ps.w.org/vikbooking/assets/icon-256x256.png?rev=1855707)
 * [VikBooking Hotel Booking Engine & PMS](https://wordpress.org/plugins/vikbooking/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/vikbooking/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/vikbooking/)
 * [Active Topics](https://wordpress.org/support/plugin/vikbooking/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/vikbooking/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/vikbooking/reviews/)

## Tags

 * [language](https://wordpress.org/support/topic-tag/language/)

 * 3 replies
 * 2 participants
 * Last reply from: [alarralde](https://wordpress.org/support/users/alarralde/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/shortcode-language-issue/#post-11481704)
 * Status: resolved