type
LocalizationConfig
Content locales, fallback behavior, and optional request-scoped admin availability.
Locales[]Locale- Ordered configured content locales.
DefaultLocaleschema.LocaleCode- Locale selected when a request does not specify one.
DisableFallbackbool- Requires exact locale values instead of following fallback chains.
AvailableLocalesLocaleAvailability- Optionally reduces locales visible to one admin request without weakening API validation or authorization.
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.
Example
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",
},
}