In my previous two recent posts, I have explained what now comes with the core Sitecore platform for Language Fallback support as well as explanations of what, how and why to use Language Fallback and Enforce Version Presence.

Now I will show you how easy it is to quickly enable these settings and start using them.

Configuration File Updates

  1. In a patch config file, update the site nodes for each applicable website AND THE SHELL SITE to set the enableItemLanguageFallback and/or enableFieldLanguageFallback to true. By setting these to true on the shell site, you allow content authors to view fallback within the content editor.
    1. You will turn on/off enforceVersionPresence at a site-wide level here as well (no need to do that on shell).
    2. REMEMBER: although you have turned on the functionality at a site-wide level here in a config file, you STILL need to turn on Item or Field level fallback for specific templates / fields within the Sitecore content editor as well! (see below).


  2. Update your index config files to enable fallback, by setting similar attributes:
    1. Note: this tells the index document creator to get the fallback values, if applicable, and save the fallback values directly into the search index for that language. If you don’t tell your indexes that fallback should be considered, then the crawler will not set the item or field values into the index documents and therefore your search will return no results, even though it is displaying that fallback item or text on the site in that language.


  3. Link Manager: you will have more than one language in your site. Depending on your domain strategy, you most likely need to make sure language is embedded 'always' in your links.


  4. At Verndale, we have overridden the LinkProvider so the languageEmbedding value can be set with the site definition config and therefore can be set at a site level (by default Sitecore only allows this to be set globally for the whole instance and therefore every site).


  5. There are a few other configuration settings you could set, but we advise to just leave these alone with default values:
    1. LanguageFallbackFieldValues.DefaultCacheSize
    2. languageFallbackFieldValues (cache size per database)
    3. AllowVaryFallbackSettingsPerLanguage


Sitecore Content Editor Updates

  1. Add the new language(s) to Sitecore
    1. Go into the System/Languages folder, right click Languages and add the new language
    2. After it is added, update it to set the Fallback Language field to a different language


  2. BE CAREFUL to not create a circular reference! BAD:


  3. You can however have chained fallback: FINE:


  4. Configure the templates/fields to fallback (depending on what kind of Language Fallback you want to use)
    1. Item Level Fallback:
      1. On EACH template, you must turn on Item Level fallback by going to the Standard Values, view the Standard Fields, and in the Advanced section, click the "Enable Item Fallback" checkbox.
      2. This is also where you would select the checkbox to Enforce Version Presence on a particular template


    2. Field Level Fallback
      1. On EACH field of EACH template, you must turn on "Enable field level fallback" by selecting the checkbox.
      2. NOTE: although it is an option, do not click the 'versioned' checkbox option here, you want the SHARED field. When I talk strategy on my next blog post, I will get into the reason why.
      3. CONSIDERATION: Don't just do this for your user-defined templates, you also probably want to do this for the system templates for Dictionary and Versioned Media (if you decide you want to version your images/files in the media library)

    Powershell to the Rescue! (if you want to do it yourself)

    Right about now, you are starting to panic over the number of field checkboxes you will have to check.  DON'T! This is where the power of the Sitecore Powershell Extensions Module comes in.  If you don't already have it, go get it from the Sitecore Marketplace.  You can use the following example to write some scripts to quickly toggle these on (or off) recursively (modify this script to do the same for Item Level fallback or Enforce Version Presence as well).


    Better Yet, take advantage of the fact WE have done this for you already!   You can install a Sitecore package that my colleague, Steve Striga, has put together that replicates that logic using the ribbon. This is available in the Marketplace now:
    A click of a button will cascade down through templates, checking (or unchecking) the checkboxes for Item Fallback, Field Fallback and Enforce Version Presence.  
  5. Using Field Level Fallback and need to make the fallback content Searchable in an Index? Then you need to add an initial language version in the new language(s) to every Sitecore item where applicable, otherwise Sitecore will consider the item non-existent in that language and not index the fallback content.


  6. AGAIN, before you start imagining the pain of clicking every single item so that you can click the link to 'Add language version', you have options to automate this. 

    1. Use the Language Migration marketplace tool:, read more about this here:
    2. Write a powershell script similar to what is above that will loop through all items and add a version in a particular language
    3. Default Sitecore to create the versions when you add an item: read more about this here:


Finally, a few more code updates to consider:

  1. Using GlassMapper? If so, you need to make sure that the Version Count logic is disabled. 

    You can read more about it here:

    Basically, by default, Glass will check if the language version of an item exists to prevent null errors.  With fallback, it would end up not being null, but Glass never gets that far.  You need to tell it to not make that check, so that the fallback version can come into play.  Note that this will open up your code for possible null exceptions if the language version truly doesn't exist and there is no fallback, so you need to make sure you have the proper null checks in your code.

    You can either wrap your Glass code like this (you would want to abstract this into a base method so you don't have to always remember to do so):


    Or disable it for the whole application (my personal preference) in the Application_BeginRequest, making sure to dispose of it in the EndRequest. (you can grab the code for this in the above glass link).



  2. Make sure that any index queries you are making have language specified in it. You should pass Sitecore.Context.Language in as a parameter.
    1. Something along these lines:
      1. var query = context.GetQueryable<SearchResultItem>().Where(x => x.Language == Sitecore.Context.Language);


  3. Make sure, on each page, you are specifying the meta alt lang tags, the canonical reference is output correctly, and you've thought through your xml sitemap strategy. I'll include a post that is SEO-specific later in this series.

With all of this done, language fallback should be enabled and configured for use.  As you can see, it is pretty easy to quickly turn it on and there are minimal configurations.  To test and make sure this is working, I have validation steps from earlier in my series that are still valid on this post: (scroll down to the section that says "Validate fallback in content editor" and "Validate fallback in front-end".