Vice President of Client Services
Field Fallback in the New World of Sitecore 81
We recently launched a website for a global financial institution. The solution featured 16 regional sites using 13 different languages. A decision had to be made early on as to how these languages would be supported in our solution.
In case you are not familiar with Language Fallback, its job is to serve content despite there not being any for a certain language (think of a default value for each item). Meaning if I have a site that supports 3 languages and I create a new Blog Post titled “Field Fallback in the New World” on the English version, “Field Fallback dans le nouveau monde” on the French version, and I do not create a Spanish version by default if you went to the Spanish version of that page, you would not see any content. Assuming you chose English as your default language and enabled Item Fallback on the Blog Post, you would see the English version for the blog content.
When starting development, we (like a lot of people), installed Alex Shyba’s Language Fallback from the Sitecore marketplace. A few weeks into development, however, Sitecore 8.1 was released; We upgraded the solution, removed the Language Fallback module, and utilized Sitecore’s built in language fallback functionality.
We didn’t anticipate too much of a change as Sitecore based their fallback solution on Alex Shyba’s. The benefit now with Language Fallback built in to Sitecore is it will be maintained and tested for every new version that Sitecore releases. We did hit one snag while working with Sitecore native 8.1 Fallback implementation. We uncovered a bug - any time an item was created outside of the main Home item and using anything other than “Insert Item from Template” (eg. copy, clone, package installation) any item that was set as a Fallback would switch to an actual empty version of the item in all languages. The resulted in several pages looking to have lost all of their content. Sitecore was able to give us a patch to resolve this and we believe this will be fixed in an upcoming release.
There is one other popular option out there, Hedgehog also has a Sitecore Marketplace module to handle Language Fallback. Their offering includes everything offered by Sitecore with the addition of 3 features:
- Ancestor Fallback - A field falls back to the value of its nearest set ancestor
- Lateral Fallback - A field falls back to the value of another field, or chain of fields
- Default Fallback - A field falls back to a text value or a token that is transformed at render time (not item creation time!)
All three solutions offer these two basic features:
Item Level Fallback – enables an entire item (and its fields) to fallback to an empty item in another language without having to create that item in the specific language
Field Level Fallback – enables you to specify on a field by field basis which values should be localized and which should fallback. As it is set on the field level it requires a lot more initial setup. Additionally, the item itself must still be localized since only certain fields are falling back.
Because all three options offer (at their foundation) the same functionality and I did not need the Ancestor/Lateral Fallback, I thought it best to use Sitecore’s native solution. Despite uncovering a bug in its functionality, the professional support we received as well as the support for upcoming releases make it both reliable and scalable.