Introduction

A multilingual site is a site that is set up to display in more than one language. To learn more about enabling multilingual functionality in a site, see About Wix Multilingual.

To use the Multilingual API, import wixWindowFrontend from the wix-window-frontend module:

Copy
import wixWindowFrontend from "wix-window-frontend";

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

Did this help?

currentLanguage


currentLanguagestring

Sets or gets a site's current display language.

Setting the currentLanguage property changes a site's display language. The current page is reloaded in the newly set language.

Set the current language using a two-letter language code. The code must represent one of the languages set to show on a site. You can retrieve a site's languages and corresponding language codes using the siteLanguages property.

Getting the currentLanguage property gets the two-letter language code of a site's current display language.

JavaScript
import wixWindowFrontend from "wix-window-frontend"; // ... let language = wixWindowFrontend.multilingual.currentLanguage; // "en"
Did this help?

isEnabled


isEnabledbooleanRead-only

Gets whether a site has been set up to be shown in multiple languages.

Get whether a site is set up to be shown in multiple languages
JavaScript
import wixWindowFrontend from "wix-window-frontend"; // ... let isEnabled = wixWindowFrontend.multilingual.isEnabled; // true
Did this help?