type

LocalizationConfig

Application content-locale configuration.

Example

go
LocalizationConfig{
  Locales: []Locale{
    {Code: "en", Label: "English"},
    {
      Code:            "fr",
      Label:           "Français",
      FallbackLocales: []schema.LocaleCode{"en"},
    },
  },
  DefaultLocale: "en",
}

Properties

PropertyTypeDescription
Locales[]LocaleOrdered configured content locales.
DefaultLocaleschema.LocaleCodeLocale selected when a request does not specify one.
DisableFallbackboolRequires exact locale values instead of following fallback chains.
AvailableLocalesLocaleAvailabilityOptionally reduces locales visible to one admin request without weakening API validation or authorization.

How it works

Leave Locales empty to disable content localization. When localization is enabled, DefaultLocale must name one configured locale and every fallback must also be configured.

FallbackLocales are checked in order after the requested locale unless DisableFallback is true. AvailableLocales only narrows the locale picker for the current admin request; it cannot add locales, change API validation, or grant access, and executable callbacks are never serialized into the schema manifest.

Full signature

type LocalizationConfig struct { Locales []Locale DefaultLocale schema.LocaleCode DisableFallback bool // AvailableLocales may reduce the locale list exposed to an admin request. // It does not weaken API validation or authorization and is never serialized. AvailableLocales LocaleAvailability }

Source core/config.go:66