Recently we had a client lose all the content on their homepage because they changed the language of their homepage node, which meant the connection between all the paragraphs on it and the homepage was lost. Now, I realise the 'real' solution is to get paragraphs to handle a language change, but I'm raising this issue because I think it's still a valuable concept: it should be possible to prevent the language of an entity being changed once it has been created.
In D7, the entity_translation contrib module had a (per-bundle) setting for this. I believe it should be an option provided for D8 translations (i.e. core) too. The fact that I have contrib modules that don't handle the situation well should be irrelevant, because even if they did, I would want to avoid the possibility of existing content 'going missing' due to the language being changed. In my opinion, it's a bit of a usability issue, as the language selector looks a bit like a toggle for 'which translation to edit', rather than 'what is the language of this existing content'. That's a separate issue that I'd love to see addressed, but disabling the language selector for existing content (which is what the D7 ET setting did) would go a long way to resolving this as it pushes editors to correctly use the Translate tab instead.
With any luck, I'll get budget to implement a solution in a custom module here (as my client doesn't need it to be configurable), but I'm not entirely sure how this would be best configured within core. The content translation settings page is already an enormous page full of checkboxes, so I'm reluctant to just add another bunch of settings there. I'd be interested to hear whether this is even suitable for core (I think it is because of the usability issue & potential for what can appear to be data loss).
P.S. I've raised this against content_translation, but I don't know if this could also apply to other types of translation (e.g. config) too?
Comments
Comment #2
james.williamsFor anyone looking for a quick solution, this is mine, in a custom module:
Comment #11
kunalkursija commentedI have come across content editors who by mistake create content in one language say "English", But later on change it to "UND" for some reason. This kind of behavior causes issues like https://www.drupal.org/project/drupal/issues/2961670
I think it would be a plus to disable language switching once the content has been created.