Search...
getLocale( )
Gets site locale information.
Description
The getLocale()
function returns a Promise that resolves to the site's
locale information.
The retrieved locale information is the information that has been entered in the General Info section of your site's Dashboard.
Authorization
Request
This endpoint does not take any parameters
Response Object
Fulfilled - An object containing the site locale information. Rejected - Error message.
NAME
TYPE
DESCRIPTION
country
string
Site country.
languageCode
string
Site language code.
Status/Error Codes
Was this helpful?
Get site locale information
Copy Code
1import { Permissions, webMethod } from 'wix-web-module';2import wixSiteBackend from 'wix-site-backend';34export const getLocale = webMethod(Permissions.Anyone, () => {5 return wixSiteBackend.generalInfo.getLocale();6});78/*9 * {10 * "country": "US",11 * "languageCode": "en"12 * }13 */