Configure language fallback
Depending on your Sitecore solution, you can make a few adjustments to your language fallback configuration.
Language fallback and search index
Language fallback and search index
If your solution relies on Sitecore’s content search (item buckets) and you want to use language fallback, you must set up the particular search index to handle item- or field-level fallback.
To do this:
-
Enable the relevant fallback modes by setting the inner value of the corresponding xml child element for the relevant search index to
true. -
Perform a full rebuild of the affected indexes.
If your configuration file does not contain these elements, use the Sitecore.ContentSearch.Lucene.Index.Master.config file as an example of how to apply them.
No data is added to the index if there is no version of the field in the fallback language. However, in this case, the Sitecore data API returns items with fallback field values, and therefore you should enforce version presence on these items.
Settings in the Sitecore.LanguageFallback.config file
Settings in the Sitecore.LanguageFallback.config file
In the the Sitecore.LanguageFallback.config file, you can make changes to the following settings:
-
DefaultCacheSizedetermines the default cache size that stores the language fallback field values. The default value is 20MB.If you want different cache sizes on different databases, you can use the following code sample. The sample is available in the configuration file.
-
AllowVaryFallbackSettingsPerLanguageenables you to have different fallback settings for the same field in different languages.The default value is false. If you enable this feature, the performance is considerably degraded.