type
LocalizationConfig
Application content-locale configuration.
Example
LocalizationConfig{
Locales: []Locale{
{Code: "en", Label: "English"},
{
Code: "fr",
Label: "Français",
FallbackLocales: []schema.LocaleCode{"en"},
},
},
DefaultLocale: "en",
}Properties
| Property | Type | Description |
|---|---|---|
Locales | []Locale | Ordered configured content locales. |
DefaultLocale | schema.LocaleCode | Locale selected when a request does not specify one. |
DisableFallback | bool | Requires exact locale values instead of following fallback chains. |
AvailableLocales | LocaleAvailability | Optionally 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
}