Locale Settings Object


The Locale Settings object represents the multilingual configuration settings for a site.

Properties
revisionstringRead-onlyformat int64

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


createdDatestringRead-onlyformat date-time

Date and time the locale settings were created.


updatedDatestringRead-onlyformat date-time

Date and time the locale settings were last updated.


multilingualModeEnabledbooleanRead-only

Whether multilingual mode is enabled for the site. When enabled, you can create secondary locales.

Default: false


autoSwitchboolean

Whether the live site automatically opens in a secondary locale if the site visitor's browser is set to that locale.

Default: false

Caution: Auto-switch can harm SEO by causing duplicate content issues and restricting search engine indexing of different language versions, which limits visibility in search results.


urlStructurestring

Defines the default method for how secondary languages appear in the live site's URL. The URL structure can be overridden per locale, using the Locale API.

Default: "SUBDIRECTORY"


primaryLocalePrimaryLocaleRead-only

The site's primary locale.

Did this help?