Last active
January 9, 2020 20:55
-
-
Save mauhg/e7acec7f54ae787cd90075df9c6e986a to your computer and use it in GitHub Desktop.
Drupal 8: Hide language from pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Some cases the language is display at the bottom of the page when translation is enable | |
* and the config from the ui is not working use this snipet | |
*/ | |
$entity_display_repository = \Drupal::service('entity_display.repository') | |
->getViewDisplay('node', '<CONTENT_TYPE_NAME>', 'full') | |
->removeComponent('langcode') | |
->save(); | |
//dpm($entity_display_repository); // to check the result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment