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.
Syntax
function getLocale(): GeneralInfoLocale
getLocale Parameters
This function does not take any parameters.
Returns
Fulfilled - An object containing the site locale information. Rejected - Error message.
Return Type:
Promise<GeneralInfoLocale>
NAME
TYPE
DESCRIPTION
country
string
Site country.
languageCode
string
Site language code.
Was this helpful?
Get site locale information
Copy Code
1import wixSiteBackend from 'wix-site-backend';23export function getLocale() {4 return wixSiteBackend.generalInfo.getLocale();5}67/*8 * {9 * "country": "US",10 * "languageCode": "en"11 * }12 */