Locale Object


A locale represents a language and region code that defines how a site's content should be displayed for a specific audience.

Properties
idstringRead-onlymaxLength 20format LANGUAGE_TAGimmutable

Locale ID. The ID is made up of the language and region codes supported by Wix. For example, "en-US".


revisionstringRead-onlyformat int64

Revision number, which increments by 1 each time the locale is updated. To prevent conflicting changes, the existing revision must be passed when updating the locale object.


createdDatestringRead-onlyformat date-time

Date and time the locale was created.


updatedDatestringRead-onlyformat date-time

Date and time the locale was last updated.


languageCodestringimmutableformat LANGUAGE

Language code. For example, "en" for English.


regionCodestringimmutableformat COUNTRY

Region code. For example, "UK" for United Kingdom.


visibilitystring

Locale visibility status.


primaryLocalebooleanRead-only

Indicates whether the locale is the site's primary locale.


visitorPrimaryLocalebooleanRead-only

Indicates whether the locale is treated as the default for site visitors when no language is specified in the URL of the site.


flagstringmaxLength 3

Flag icon as a 3-letter language code based on Wix's supported locales. For example, "USA" for the United States flag icon.


regionalFormatstringformat LANGUAGE_TAG

Regional format for determining how to display data types such as dates, times, numbers, and currencies. For example, "en-US" to format dates like this: MM-DD-YYYY.


effectiveUrlStructurestringRead-only

Default URL structure for the locale's live site URL, based on the locale's settings, unless overridden.


urlStructureOverrideUrlStructureOverride

Optional override for the locale's default URL structure.


machineTranslationCodestringformat LANGUAGE_TAG

Language code based on Wix's supported locales, used to specify the target language when translatable content is sent for machine translation. For example, "ES" for Spanish or "ZH_TW" for Traditional Chinese.

Default: The locale's languageCode value.


effectiveDisplayNamestringRead-onlymaxLength 30

The locale's displayName, unless overridden.


displayNamestringRead-onlymaxLength 30

Default display name for the locale, inferred from the locale ID and region code.


overrideDisplayNamestringmaxLength 30

Optional override for the locale's display name.

Did this help?
OSZAR »