entity_get_bundles()
from translation_entity_entity_info_alter()
.'translatable'
boolean entity key.'translatable'
entity key to the bundle info and add also a helper method EntityInterface::isTranslatable()
so that the key does not need to be actually populated.entity_get_bundles()
while altering the entity info: ET should create the translation overview route for each translatable entity type, no matter if it has any bundle enabled for translation yet. The tab visibility should be determined by access control as usual.None
'translatable'
flag in the entity info.'translatable'
flag has been added to the bundle info, determining whether the bundle is enabled for translation.
#1945348: Call decorated storage methods in ViewsUI explicitly β
For example, if I enable content translation (either via translation.module or a contrib module) for article node types but not page nodes, those modules should be altering hook_entity_info() for $info['node']['bundles']['article'] to indicate that translating is enabled.
Something like:
/**
* Implements hook_entity_info_alter().
*/
function translation_entity_info_alter(&$info) {
foreach ($info['node']['bundles'] as $type => &$bundle) {
if (translation_supported_type($type)) {
// Mark that translation.module is providing localization for this content type.
$bundle['translation']['translation'] = TRUE;
}
}
}
Would also be nice to have a isTranslatable() method in the default Entity class that we can call as well (and an entity_is_translatable($entity_type, $entity) API addition for D7).
Fixed
8.0 β°οΈ
entity system
Enhances an existing API or introduces a new subsystem. Depending on the size and impact, possibly backportable to earlier major versions.
After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.
(Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.