4

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?

enter image description here

8

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 /sitecore/system/languages.

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.

| improve this answer | |
  • 1
    I want the defined Languages(/sitecore/system/languages) to be used only and restrict such kind of issues from happening again and again.How can I do so? – Amitabh Nov 7 '16 at 11:24
  • Well, AFAIK, you don't, they are just there. I installed a Sitecore v8.1 a while ago and also had to remove multiple undefined languages. Next to Danish I also had Japanese and German I think. Once they are removed, they will not be added again. Unless you install old packages or revert serialized items. – Thomas D Nov 7 '16 at 11:27
  • I guess you removed the multiple undefined languages by removing it from the "LanguageDefinitions.config". – Amitabh Nov 7 '16 at 11:36
  • No, I didn't touch that file. I'm not sure when or how Sitecore uses this config file. – Thomas D Nov 7 '16 at 11:58
2

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.

The Language 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.

| improve this answer | |
1

The language 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:

enter image description here

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:

enter image description here

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.

| improve this answer | |
0

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.

| improve this answer | |
  • No. But as mentioned; this comes out of the box. Admin users can add any language version to any item - regardless of what has been set up under ../languages. This is by design. – Mark Cassidy Nov 7 '16 at 12:20
  • Out of the 3 Languages(en-au, en, da) 'da(dansk)' is not expected and it is not even added under the Languages(/sitecore/system/languages) in Sitecore. As I know the Language read/write access option can be provided to the languages existing or added under '/sitecore/System/Languages'. As 'da' was not added under 'System' and the administrator is also not provided with the 'More Languages' button option(on click of Language button) to select any languages, I am wondering how it appeared and how I can restrict such kind of issues. – Amitabh Nov 7 '16 at 12:28
  • My motive here is only the required Languages defined for my website (/sitecore/system/languages) should exist with a version. – Amitabh Nov 7 '16 at 12:30
  • any suggestion on how to restrict such kind of issues? I guess you understand and agree on the issue that any Lang like 'da' not defined and coming up in the website with version is not accepted. – Amitabh Nov 8 '16 at 8:07

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.