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
createdDatestringRead-onlyformat date-time

Date and time the locale was created.


displayNamestringRead-onlymaxLength 30

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


effectiveDisplayNamestringRead-onlymaxLength 30

The locale's displayName, unless overridden.


effectiveUrlStructurestringRead-only

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


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.


idstringRead-onlymaxLength 20format LANGUAGE_TAGimmutable

Locale ID.

The locale ID is made up of the language and region codes supported by Wix. For example, "en-US" for U.S. English.


languageCodestringimmutableformat LANGUAGE

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


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.


overrideDisplayNamestringmaxLength 30

Optional override for the locale's display name.


primaryLocalebooleanRead-only

Whether the locale is the site's primary locale.


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.


regionCodestringimmutableformat COUNTRY

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


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.


updatedDatestringRead-onlyformat date-time

Date and time the locale was last updated.


urlStructureOverrideUrlStructureOverride

Optional override for the locale's default URL structure.


visibilitystring

Locale visibility status.


visitorPrimaryLocalebooleanRead-only

Whether the locale is the site's visitor primary locale.

Did this help?