diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 0487d03..7978e77 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -134,6 +134,13 @@ class EntityType extends Plugin { public $static_cache = TRUE; /** + * Boolean indicating whether language is supported for entities of this type. + * + * @var bool (optional) + */ + public $language_supported = FALSE; + + /** * Boolean indicating whether entities of this type have mutlilingual support. * * @var bool (optional) diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php index 63f5e82..8c9f86e 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php @@ -33,6 +33,7 @@ * revision_table = "custom_block_revision", * menu_base_path = "block/%custom_block", * fieldable = TRUE, + * language_supported = TRUE, * translatable = TRUE, * entity_keys = { * "id" = "id", diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php index b57c74f..1da22dc 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php @@ -32,6 +32,7 @@ * base_table = "comment", * uri_callback = "comment_uri", * fieldable = TRUE, + * language_supported = TRUE, * translatable = TRUE, * static_cache = FALSE, * entity_keys = { diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 6bbb5a7..83d1712 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -201,7 +201,7 @@ function language_theme() { function language_entity_supported() { $supported = array(); foreach (entity_get_info() as $entity_type => $info) { - if (!empty($info['fieldable']) && !empty($info['translatable'])) { + if (!empty($info['language_supported'])) { $supported[$entity_type] = $entity_type; } } diff --git a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php index 99c6b88..bf7df81 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php @@ -33,6 +33,7 @@ * revision_table = "node_revision", * uri_callback = "node_uri", * fieldable = TRUE, + * language_supported = TRUE, * translatable = TRUE, * entity_keys = { * "id" = "nid", diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php index 60811db..7a96c81 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php @@ -32,6 +32,7 @@ * base_table = "taxonomy_term_data", * uri_callback = "taxonomy_term_uri", * fieldable = TRUE, + * language_supported = TRUE, * translatable = TRUE, * entity_keys = { * "id" = "tid", diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php index c69171d..7ca2feb 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php @@ -26,6 +26,7 @@ * } * }, * config_prefix = "taxonomy.vocabulary", + * language_supported = TRUE, * entity_keys = { * "id" = "vid", * "label" = "name" diff --git a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php index 829babc..ceade16 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php @@ -33,6 +33,7 @@ * uri_callback = "user_uri", * label_callback = "user_label", * fieldable = TRUE, + * langauge_supported = TRUE, * translatable = TRUE, * entity_keys = { * "id" = "uid", diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php index b8ca3bc..2c6c4cc 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php @@ -34,6 +34,7 @@ * }, * config_prefix = "views.view", * fieldable = FALSE, + * language_supported = TRUE, * entity_keys = { * "id" = "id", * "label" = "label",