Language fallback – changes to APIs
The changes to the Sitecore API that is introduced with language fallback
With the language fallback feature, the following APIs have changed.
The following properties and methods have been added to the class:
GetLabel(bool showFieldSharingLabels)
– a refactored method that executes thegetFieldLabel
pipeline.ContainsFallbackValue
– a new property that returns true if the field contains fallback value.FallbackValueSource
– a new property that returns the string descriptor of the fallback value source.GetValue(bool allowStandardValue, bool allowDefaultValue, bool allowFallbackValue)
– a new method override with theallowFallbackValue
parameter.
The following properties have been added to the class:
OriginalLanguage
– a property that returns the original language for the current item. If the item is not a fallback item, it returns theitem.Language
.IsFallback
– a property that returns true if the current item is a fallback item.
The following properties have been added to the class:
EnableItemLanguageFallback
EnableFieldLanguageFallback
EnforceVersionPresence
The following property is changed:
IsReadOnly
– a property that returns true if theitem.IsFallback is set to
true.
Besides the getItem
, getFieldValue
, and getFieldLabel
pipeline processors, the following classes have been introduced to support the language fallback feature:
LanguageFallbackManager
LanguageFallbackStrategy
DefaultLanguageFallbackStrategy
LanguageMapping
LanguageFallbackFieldValuesProvider
LanguageFallbackFieldValuesCollection
LanguageFallbackFieldValuesCache
LanguageFallbackFieldValue
EnforceVersionPresenceDisabler
LanguageFallbackItemSwitcher