0

While trying to create the first version of Spanish(Ver 1), I see all the fields are empty, it doesn't populate the same values from the eng version.

Enabled enableItemLanguageFallback = "true" in the site name="website" in sitecore.config.

Added the fallback language as en for Spanish

enter image description here

enter image description here

Is there any change I need to make to enable the fallback for the first version to be en?

1 Answer 1

1

As per your question, I think you are skipping enable version level fallback, which I mentioned at the end of this answer.

To enable site-level language fallback:

Open \App_Config\Sitecore\Sitecore.config and set the following attributes to true:

  • enableItemLanguageFallback
  • enableFieldLanguageFallback

You must enable the attributes on the shell and on each of the relevant websites. Use patch files, don't make changes directly.

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

Now you must specify the language that you want it to fall back to. The fallback language specified on a language definition item applies to all the fields and items that have language fallback enabled. That you have also done as mentioned in your question.

On all the individual items or item templates where you want to use language fallback, you must enable item-level fallback.

  • In the content tree go to the relevant item.
  • To enable language fallback on a template, go to the relevant template and click the _Standard Values item.
  • In the Advanced section, select Enable Item fallback. enter image description here

You can enable field-level fallback as well.

Enable versioned field-level fallback – to enable language fallback for only the current language version of the field.

To allow different fallback settings for the same field in different languages (versioned fallback), in the Sitecore.LanguageFallback.config file, you must set the configuration setting LanguageFieldFallback.AllowVaryFallbackSettingsPerLanguage to true. However, this degrades performance considerably.

Refer to the document for more details: Enable and set up language fallback

Hope it helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.