Search.../

getMultilingual( )

Gets site multilingual information.

Description

The getMultilingual() function returns a Promise that resolves to the site's multilingual information.

The retrieved multilingual information is based on the languages set using Wix Multilingual.

Syntax

function getMultilingual(): GeneralInfoLanguages

getMultilingual Parameters

This function does not take any parameters.

Returns

Fulfilled - An object containing the site multilingual information. Rejected - Error message.

Return Type:

Promise<GeneralInfoLanguages>
NAME
TYPE
DESCRIPTION
supportedLanguages
Array<GeneralInfoLanguagesSupported>

List supported languages.

autoRedirect
boolean

Whether to automatically redirect users based on their browser's settings.

Was this helpful?

Get site multilingual information

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import wixSiteBackend from 'wix-site-backend';
3
4export const getMultilingual = webMethod(Permissions.Anyone, () => {
5 return wixSiteBackend.generalInfo.getMultilingual();
6});
7
8/*
9 * {
10 * "supportedLanguages": [
11 * {
12 * "languageCode": "en",
13 * "locale": {
14 * "country": "US",
15 * "languageCode": "en"
16 * },
17 * "iconUrl": "someUrl",
18 * "isPrimary": true
19 * }
20 * ],
21 * "autoRedirect": true
22 * }
23 */