1

Setting an existing field "shared" from "versioned" on the template always sets the most recent language version value for that field in the items of that template type.

Is there some way to always set the "en" language version value (irrespective of it being the most recent language version or not) for that field instead of most recent language version ?

0

Sorry a bit late to answer on the question. As I couldn't find any out of the box way so created a workaround to resolve this issue. Below are the steps:

  • Firstly, created a Sitecore Powershell script to copy over the EN language values over to the other languages like de-DE, fr-FR etc. for all the items based on a particular template.

  • Once, script ran successfully and all the other language versions have an EN language value then only navigated to that particular template and made the field as shared.

As, all the language versions now had the same values making a field shared will take the most recent updated value which would be EN language version value.

-1

Going by principles of "shared" field as explained very nicely here "https://ankitjoshi2409.wordpress.com/2017/06/26/versioned-unversioned-and-shared-fields-in-sitecore/", it is by design that when you mark a field as "shared", any value entered on any language version will be shared across all other language versions. It will not make sense such that you enter a value for a shared field of a language and when you save and come back you still see the value of that field as that of "en" language.

On the other hand you can utilize the language fallback feature ("https://doc.sitecore.com/developers/93/sitecore-experience-manager/en/enable-and-set-up-language-fallback.html") such that any new version of language of item you create, you will see the field value default to that desired language fallback value you specify (like in your case "en").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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