1
votes

I need to modify admin Languages view (add checkbox) so that when checked, language is excluded during language drop-down render.

This should only hide language (remove from drop-down) but not disable/remove language (and content) itself.

Languages view with custom column language drop-down without hidden languages

I have very little experience with Drupal but I guess this needs to be done:

  1. Languages view modified (checkbox added)
  2. Model (and table) representation of language modified (bool added)
  3. Drop-down render modified to skip languages with bool set to true

Any help would be much appreciated on how to implement this.

1

1 Answers

1
votes

this is indeed not an easy task! Modifying the drupal core template inside of an module is of course possible, but will kind of detach you from the future core updates. I would suggest to wirte your own dedicated module and then create a custom configuration page for languages that should be hidden.

This tutorial helped me a lot to get the basics on drupal8 odule development.

Inside of the module (web/modules/custom/your_module), you need then to create the file: templates/links--language-block.html.twig where you can take your custom configuration into account in order to hide certain links.

Best wishes!
Andreas