Once upon a time we spoke just English and then we made new friends across the time zones and geographical borders. Now we are trying to learn their language and get to know better. This is taking time and we still use English in some instances to avoid an awkward pause in dialogue.
Yes, I am still speaking Sitecore (v9.0.2) and the big topic today is Language Fallback and particularly the process of enabling new language versions to automatically have all the predefined fallback language’s content. Sitecore provides a great feature of Language Fallback for content to automatically render in the defined fallback language for elements not having a intended language version.
The enabling is a 3-step process.
One…..Enable Item Fallback for all the template standard values to ensure new content automatically renders in the defined fallback language. For this I used a script as detailed by Shu Jackson in
Two…..Enable Item Fallback for all existing content.This was necessary in for our client’s existing sites. I wrote a powershell extension script, for accomplishing the task.
More about Powershell Extensions here https://marketplace.sitecore.net/en/Modules/Sitecore_PowerShell_console.aspx
Three…..So tempted to write last but not the least (:rolling eyes 🙂 the background task of actually moving the final renderings to the new language version. This proved exceptionally useful for our use case of what we call “Experience Blocks”. Somewhere on the lines of Jeff Darchuk’s blog post https://jeffdarchuk.com/2015/10/18/render-item-to-string-mvc/
For this I trapped the item:versionAdded event and copied the Final Layout renderings to the new version.
I will not bore you with the details of patching your code into the pipeline etc. etc. (I’m sure you know it all 🙂
Hope this helps!