0
votes

I'm working in a multi-site, multi-lingual sitecore project, and from time to time, someone adds lots of content on certain sub-site, fight hours with the publishing and being unable to see the updated content, and eventually realise after a couple of hours that all the input was in the wrong language for the sub-site.

So i'm wondering if there is a way in sitecore to support the following:

  • a folder (for a sub-site) that supports that after clicking an existing item below it, the language automatically changes to the default language for the site folder
  • since the language is automatically changed, new items created below that folder will be created in the default sub-site language, unless the user explicitly changes it to something else

If the above is impossible or not supported, an excellent workaround would be to be able to change the language of an item language version (say, i created an english version for a page on a spanish site with all the content in spanish, so i want to tell sitecore that i want to make this version actually the spanish version, without going into copying fields manually in the translate ui

2

2 Answers

1
votes

It sounds like you might want to consider a few things:

  1. The Language Fallback Provider - this allows you to have have content fallback from one language to another if it doesn't exist.
  2. A custom extension (maybe an event handler for item:creating or item:created) to Sitecore to switch the context language based on where an editor is creating an item.

Just ideas right now...

1
votes

An alternative approach would be to work with language read and language write security settings for your content contributors.

If your contributor for your Spanish site should only be adding items in Spanish then configure their access settings so that they aren't allowed to create content in other languages.

If you have a lot of content that has been entered in the wrong language then you can use the Globalization - Export language tool (from the Start menu) to export it to an XML file, manually replace the language tags (this is as simple as a search and replace on "en>" -> "es-ES>" for example) and then reimport it in the new language using the Globalization - Import language tool. Warning though: this WILL overwrite any existing versions.