Gets site multilingual information.
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.
function getMultilingual(): Promise<GeneralInfoLanguages>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getMultilingual = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getMultilingual();
});
/*
* {
* "supportedLanguages": [
* {
* "languageCode": "en",
* "locale": {
* "country": "US",
* "languageCode": "en"
* },
* "iconUrl": "someUrl",
* "isPrimary": true
* }
* ],
* "autoRedirect": true
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.