Methods

View the JS SDK public methods.

isReady

Check is LangShop ready

/**
 * @return {boolean}
 */
LangShopSDK.isReady();

// true

getCurrentLanguage

Returns current page language

/**
 * @return {Language}
 */
LangShopSDK.getCurrentLanguage();

// { "code": "fr", "title": "French", "icon": null }

getOriginalLanguage

Returns primary language of the store

/**
 * @return {Language}
 */
LangShopSDK.getOriginalLanguage();

// { "code": "en", "title": "English", "icon": null }

isOriginalLanguage

Indicates is current language is primary for this store

/**
 * @return {boolean}
 */
LangShopSDK.isOriginalLanguage();

// true or false

getCurrentCurrency

Returns current page currency

getOriginalCurrency

Returns original currency of the store

switchLanguage

Switch to another language by alphabetic code

/**
 * @param {string} code
 */
LangShopSDK.switchLanguage("fr");

switchCurrency

Switch to another currency by alphabetic code

/**
 * @param {string} code
 */
LangShopSDK.switchCurrency("eur");

Report incorrect information

Still Have Questions?

Our customer care team is here for you!

Contact Us