Language Fallback on Display Name

In Sitecore 8.1 we finally got language fallback built into the core product. This gives us the option to specify, per field, if we want to inherit a field value from another language when the field itself is null.

I guess we all have some sort of love and hate relation to the built in Display Name field of Sitecore. It solves a lot of potential issues, but it causes tons of other problems as well. With language fallback, there is another one. If you enable language fallback on the Display Name item, nothing happens. This is because the default LanguageFallbackFieldValuesProvider ignores all standard fields. Well, all fields starting with a double underscore to be exact.

So in order to have language fallback on Display Name or any other standard field (though the need for it on other fields are probably very rare), we’ll have to replace the default implementation, with an overridden version where the bool IsValidForFallback(Field field) method doesn’t return false just because its internal name is "__Display Name".

If you need details on how to replace the default implementation, look at my post about editor friendly language fallback.

4 thoughts on “Language Fallback on Display Name

  1. Hi Mikael,
    I’m trying achieve the same thing, but then with the fields of the Help section. Unfortunatly i’m unable to get it to work. I also tried the solution with replacing the default implementation (deleting the __ fieldname check), but it does not work.
    Did you validate the solution by overridding the default version?
    greetings, Sander

    • Are you using fallback for the help sections internally in the CMS? If so, you’ll need to enable language fallback for the “shell” website.

      • I did enable language fallback for the “shell” website via a patch file.

        We have a multi language site (>20) and currently create versions of the “__Standard Values” of the templates for all the cultures. The large number of language versions and items makes deployments slow.

        When i create a page in a language (“en”) which is equal to the language defined on the “__Standard Values” of the template, i see the help text i set for the fields in the contenteditor displayed.

        But when i choose another language for creating the page, i don’t see the help text. I expected that Field Fallback on the Help fields would work. I did bypass the “__” check, but still it doesn’t work.

        I think i want “Field fallback on the (Help) Template Fields of a __Standard Values for a template”.

        I find that the situation is not very consequent as the Displayname of the fields does come from the “en” version, even without having Fallback set-up.

        • Hmm, interesting… I don’t have a Sitecore instance at hand right now, but let me check this on one of my instances with a similar setup.

Leave a Reply