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?

revision


revisionstringRead-only

Gets the site revision ID.

The site revision ID is a unique identifier for the current revision of your site. Each time you manually save your site or publish your site following a change, a new revision is created.

You can view and manage your site revisions in your Site History. You can use site monitoring to monitor and debug new revisions of your site.

Notes:

  • Since publishing your site may change the revision ID, the ID when previewing your site may be different than the ID for the published site.

  • The site revision ID is guaranteed to be unique, but not meaningful. Therefore, you cannot predict future revision IDs before they are created.

Get the site revision ID
JavaScript
import wixSiteFrontend from "wix-site-frontend"; // ... const revision = wixSiteFrontend.revision; // "4x2y"
Did this help?

timezone


timezonestringRead-only

Gets the site's timezone.

The retrieved timezone is the timezone that has been entered in the General Info section of your site's Dashboard.

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

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