Tuesday 6 December 2016

Language Fallback on Final Layout

Last time I was struggling with translating items to different languages. I was using the ClayTablet Sitecore Translation Connector module - it basically sends the content to translator, waits till it will be returned, receives the translated content and creates new version in desired language. Sitecore was in Initial Release of 8.1.

Then I realized, that new versions of items in other languages had missing value in Final Renderings field. Unfortunately solution which I was working on, was using this field widely from the beginning - by the Experience Editor. I tried to set the Language Fallback on that field but in vain.

I have successfully reproduced this behaviour on clean instance of 8.1 Initial Release. I have enabled Language Fallback:

      <site name="shell">
        <patch:attribute name="enableItemLanguageFallback">true</patch:attribute>
        <patch:attribute name="enableFieldLanguageFallback">true</patch:attribute>
      <site name="website">
        <patch:attribute name="enableItemLanguageFallback">true</patch:attribute>
        <patch:attribute name="enableFieldLanguageFallback">true</patch:attribute>

Also I have set the fallback path in the language item:

After that I have added new rendering from Experience Editor:

Unfortunately, I wasn't able to fallback this field from the base language. I have sent my problem to Sitecore Support and they confirmed, that this feature is missing. Sadly I had nothing more to do but manually set these renderings or use a PowerShell to automate it. Fortunately this bug reported by me was labelled as feature request and now it is present on version 8.2 Update-1!

The public reference number was set to 105306.

I have downloaded the package and started to testing it out. Fresh instance was set up by the SIM.
I went to the Final Renderings field:

/sitecore/templates/System/Templates/Sections/Layout/Layout/__Final Renderings

And I have enabled field level fallback:

Everything works ok now - additional "Sample rendering" added from Experience Editor is present now on other languages that have Fallback set:

Also, the Update-1 comes with really great features like wide Azure support. You should definitely check this out!

Share it:

Radosław Kozłowski - Senior Sitecore Developer Radoslaw Kozlowski

Author & Editor

Sitecore MVP, passionate Sitecore & .NET developer and architect. Sitecore Community evangelist.


Post a Comment