We participated in Sitecore Hackathon 2021 and thought of adding an enhancement to the existing Sitecore XP. While thinking what we can add as a feature, I remembered my stakeholders coming to me in past to create new language version of the page with the existing data. Now this totally depends on the Templates configuration – which fields are marked shared, versioned or unversioned based on it the Sitecore OOTB functionality of adding new version works. Second approach is to use Sitecore PowerShell Extension (SPE) scripts to add the version with all the existing values ignoring the template configuration. The later approach is easy but not Content Author friendly and needs Developers involvement.
With this idea, our team thought we will create a Quick Version Creator with giving flexibility for Content Authors to achieve what they wish with clicks of the button.
- Flexibility while working with Content for Multi-lingual sites.
- While creating a new language version for any content item, all fields are set to empty or null based on template configuration, thus creating some inconvenience for Content Authors to know the exact content an already created language version of the item has.
- This tool provides a flexibility to create multiple language versions for an item and its sub-items with default content loaded with a single-click.
- For example: If there are some large no. of Article/News Content Items already defined in an English Language (en-US) and the company decides to create a Spanish Language (es-US) version, creating language version for each item would be a time-consuming job as well as PowerShell solution would not provide default content or non-technical feasibility.
Pre-requisites and Dependencies
⟹ For a plain vanilla Sitecore Instance, one more Language should be added to test this tool.
⟹ Installation requires 2 simple steps:
- Install an additional language version in a plain vanilla Sitecore instance.
- Install the package – IndoArabianLanguageVersionCopy-1.0.zip
⟹ Please make sure AddFeatureVersionFromLanguage.config is present inside \App_Config\Include\Feature folder
The tool looks like below:
- Create some Sample items under the Home item with default Content that will be created for English (en) version
- To create another language version (e.g it-IT or Italian) change the language version of the Home Item. (Since this is a new language version no fields are shown.)
By default, the Content Author can create another version of this single item through Version tab without any default content in the newly created language version.
Using this tool, the Content Author can create a new language version of the selected item and its sub-items with default content copied from already existing language.
- Select the item > navigate to Version tab > click on “Copy from” drop button.
- Select the Language version you want to copy the entire content from. Check Deep Copy if…. Check Include Subitems, if you want to create language version for all the subitems under the selected item.
Try out this module if you have multi-lingual solutions and share your feedback.
Thank you.. Keep Learning.. Keep Sitecoring 🙂