The Language 'Danish:dansk' exist with version on certain items but it is not added/defined under System(Sitecore/System/Languages/). How is this Language added and how can I resolve/restrict such kind of issues?
The language version is probably there by the default installation of Sitecore. They add a few language versions by default, even though the language itself is not listed under
If you have Sitecore Powershell Extensions installed, you can remove the language with the following command:
Remove-ItemLanguage -Path master:\content\home -Language "da" -Recurse
This will remove all
da versions under
/sitecore/content/home. Adjust path or language (e.g. da-DK) if necessary.
I have fixed this issue. Like Thomas suggested, use PowerShell command
Remove-ItemLanguage -Path "master:\content\companion" -Language "da" -Recurse to delete language content from item(s) and sync (I'm using Unicorn sync). It will disappear from available languages list in content tab and will never appear again.
Danish:dansk exist with version for item(s) because it would have been deleted from /sitecore/system/Languages but not from item(s). If you delete language from /sitecore/system/Languages, it would not delete related content.
Although there is a setting:
<setting name="Languages.AutoRemoveItemData" value="true" />
to configure it. It seems it is a known bug in Sitecore.
da is available when Sitecore is installed. By default, when Sitecore installs, 4 languages are available in the Language Version as provided in the screenshot below:
Note that this is a fresh Sitecore installation. Moreover, if you have created the language version from the option "More Languages", it will not appear directly in the
sitecore/System/Languages. You will need to manually create it. This is why it is not appearing in the languages container.
So, in order for you to set the Read/Write access on the language, you will need to create the language
da by right click on the Languages container -> Insert -> Language. Then, select the Danish language from the dropdown:
and click on next to continue the wizard. Note that once you selected the language, it will already prefill the textboxes. No need to add anything in there.
This is restricted by default. To control what languages your editors can use, you do this by restricting read-access for the items under the Languages node you show in your picture.
Administrator users will be able to add any language versions to your items.
The example you picture is part of Sitecore's default installation. Out-of-the-box. It is not an indication that anything in your setup is wrong.