Language fallback and publishing
The Experience Edge Connector supports language fallback when you publish items to a delivery platform.
When you publish items that use language fallback to Edge, each fallback language version must be published at least once to create the necessary dependencies on Edge. Until a fallback version has been published, its content will not appear when accessed in that language, for example through sitemap links or API responses.
After all fallback versions have been published once, you only need to publish the primary language, such as English. During subsequent publishing operations, the Edge publishing process automatically maintains dependencies for the fallback languages, so their content stays up to date without re-publishing each version individually.
The publishing items procedure depends on whether you are publishing for the first time, or republishing an item that has language fallback dependencies:
-
When you publish fallback language versions for the first time, you must publish each version to ensure that they are saved on Edge.
-
Later, when you publish the fallback language version of an item, the Experience Edge Connector checks for other dependent language versions and publishes them as well. This ensures static content for the item is available for all dependent languages on Experience Edge.
This topic explains how automatic publishing of fallback language versions is performed after the initial publication of each item independently of each other.
Item-level language fallback
The following diagram shows an example of item-level language fallback with a fallback chain of three languages:
In the diagram, Sitecore has only one English version for Item 3.
When Sitecore renders dynamically, it uses the en fallback version when it tries to render the item for en-nz (which does not have a version).
When rendering statically, the Experience Edge Connector publishes this item, using the fallback version for all dependent languages (en-au, en-nz) to get a similar result in Experience Edge. The next sections describe how the Experience Edge Connector supports language fallback in detail.
When the Experience Edge Connector publishes the fallback language version of an item, it gets other dependent languages and identifies languages without a version for that item and publishes these as well.
The languages in the diagram have these dependencies:
-
en-nzhas a direct dependency onen-au. -
en-auhas a direct dependency onen. -
en-nzhas an indirect dependency onen.
The Experience Edge Connector takes the following actions when publishing:
-
Publishing the
enversion of Item 1All dependent languages have versions of Item 1. No language fallback is necessary, and only the
enversion of Item 1 is published. -
Publishing the
enversion of Item 2There is a version of Item 2 in the directly dependent language
en-au. No language fallback is necessary, and only theenversion of Item 2 published. -
Publishing the
en-auversion of Item 2Item 2 does not have a version in all dependent languages. Language fallback is used, and the
en-nzversion is Item 2 as well. -
Publishing the
enversion of Item 3Item 3 does not have a version in all dependent languages. Language fallback is used, and the
en-auanden-nzversions are published for Item 3 as well.
Field-level language fallback
When the Experience Edge Connector publishes the fallback language version of an item, the connector also retrieves the dependent languages and identifies which ones have versions with fallback field values for that item, and then publishes these as well. The example setup in the following diagram shows items with field language fallback:
The languages in the diagram have these dependencies:
-
en-nzhas direct dependency onen-au. -
en-auhas direct dependency onen. -
en-nzhas indirect dependency onen.
The Experience Edge Connector takes the following actions when publishing:
-
Publishing the
enversion of Item 1All dependent languages have versions of Item 1 and fallback fields have their own values in each language. No language fallback is necessary, and only the
enversion of Item 1 is published. -
Publishing the
enversion of Item 2There is a version for Item 2 in direct dependent language
en-auand fallback field has its own value, language fallback is not applied and only Item 2enversion is published -
Publishing the
en-auversion of Item 2There are versions of Item 2 in all dependent languages and fallback fields have fallback values. Language fallback is used, and the
en-nzversion is published as well. -
Publishing the
enversion of Item 3There are versions of Item 3 in all dependent languages and fallback fields have fallback values. Language fallback is used, and the
en-auanden-nzversions are published as well.
Identifying dependencies between languages
This section explains the process Experience Edge Connector follows to identify the dependent language versions that it must publish.
The process is as follows:
-
The connector prepares the fallback dependency relation between the system languages (
en<-en-au<-en-nzin the diagrams). -
When the connector publishes a version of an item, it prepares a list of dependent languages from the fallback dependency relation, based on the published version.
-
The connector verifies whether item-level language fallback is applicable for the dependent languages. Item-based fallback is available if:
-
The item is item-fallback enabled.
-
The item does not have a version in the dependent language.
-
-
The connector verifies whether field-level language fallback is applicable for the dependent languages. Field-level fallback is available if:
-
The item has one or more fields with field-level language fallback enabled.
-
The item has a version in the dependent language and the value of the field (or fields) are from the fallback language (the published version).
-