Introduction

To use the site module, import wixSiteFrontend from the wix-site-frontend module:

Copy
import wixSiteFrontend from "wix-site-frontend";

The APIs in wix-site-frontend can only be used in front-end code.

Did this help?

currency


currencystringRead-only

Gets a code representing the site's currency.

The retrieved currency code corresponds to the currency that has been entered in the General Info section of your site's Dashboard.

The currency is used your site, apps (e.g. Wix Stores, Wix Bookings), and other Wix features.

Get the site's currency
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const currency = wixSiteFrontend.currency; // "USD"
Did this help?

currentPage


currentPageunionRead-only

Gets information about the current page or lightbox.

JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const currentPage = wixSiteFrontend.currentPage; /* * { * "name": "Home", * "type": "static", * "url": "/home", * "isHomePage": true * } */
Did this help?

language


languagestringRead-only

Gets a code representing the site's language.

The retrieved language code corresponds to the main site language as found in the General Info section of your site's Dashboard.

Note: If you have a multilingual site, and it is being viewed in a language that is not the main site language, the language property still returns the main site language. To work with the languages of a multilingual site, use the Multilingual API.

Get the site's language
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const language = wixSiteFrontend.language; // "en"
Did this help?

regionalSettings


regionalSettingsstringRead-only

Gets the site's regional settings.

The retrieved regional settings corresponds to the regional settings that has been entered in the General Info section of your site's Dashboard.

The regional settings are used to determine how numbers, dates, and currencies are displayed on your site.

Get the site's regionalSettings
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const regionalSettings = wixSiteFrontend.regionalSettings; // "en-us"
Did this help?