type

LocalizationConfig

Content locales, fallback behavior, and optional request-scoped admin availability.

Example

go
application := ridu.Config{
  Name: "Editorial",
  Localization: ridu.LocalizationConfig{
    Locales: []ridu.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.

Assign this value to Config.Localization. Because the root package aliases the canonical core contract, an AvailableLocales callback names its input as core.LocaleAvailabilityContext.

Full signature