- 🇬🇧United Kingdom joachim
This is still a relevant issue. Adding the term language-alterable which I encountered recently.
Follow up for #1977784: Content language settings configuration page needs to determine what entities and bundles to include →
confusing terms: translatable, multilingual, language-aware, untranslatable, non-translatable, not translatable, enable translation, translation enabled/disabled/not enabled
It's confusing in code, code comments, and UI
In the UI, to enable translation, the checkboxes usually are for making it "translatable".
the translatable setting is really (imo) whether translation is enabled
and that is set only when something is translatable. things that are not translatable do not have 'translatable' set either way.
core/lib/Drupal/Core/Entity/Annotation/EntityType.php
/**
* Boolean indicating whether entities of this type have multilingual support.
*
* At an entity level, this indicates language support and at a bundle level
* this indicates translation support.
*
* @var bool (optional)
*/
public $translatable = FALSE;
core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php
/**
* Defines the node entity class.
*
* @EntityType(
* id = "node",
* label = @Translation("Content"),
* bundle_label = @Translation("Content type"),
* module = "node",
* controllers = {
* "storage" = "Drupal\node\NodeStorageController",
* "render" = "Drupal\node\NodeRenderController",
* "access" = "Drupal\node\NodeAccessController",
* "form" = {
* "default" = "Drupal\node\NodeFormController"
* },
* "translation" = "Drupal\node\NodeTranslationController"
* },
* base_table = "node",
* revision_table = "node_revision",
* uri_callback = "node_uri",
* fieldable = TRUE,
* translatable = TRUE,
core/modules/language/language.module
/**
* Returns a list of supported entity types.
*
* @return array
* An array of entity type names.
*/
function language_entity_supported() {
$supported = array();
foreach (entity_get_info() as $entity_type => $info) {
if (!empty($info['translatable'])) {
$supported[$entity_type] = $entity_type;
}
}
return $supported;
}
core/modules/translation_entity/translation_entity.module
function translation_entity_preprocess_language_content_settings_table(&$variables) {
module_load_include('inc', 'translation_entity', 'translation_entity.admin');
_translation_entity_preprocess_language_content_settings_table($variables);
}
/**
* Stores entity translation settings.
*
* @param array $settings
* An associative array of settings keyed by entity type and bundle. At bundle
* level the following keys are available:
* - translatable: The bundle translatability status, which is a bool.
* - settings: An array of language configuration settings as defined by
* language_save_default_configuration().
* - fields: An associative array with field names as keys and a boolean as
* value, indicating field translatability.
* - columns: An associative array of translation synchronization settings
* keyed by field names.
*/
function translation_entity_save_settings($settings) {
foreach ($settings as $entity_type => $entity_settings) {
foreach ($entity_settings as $bundle => $bundle_settings) {
// The 'translatable' value is set only if it is possible to enable.
if (isset($bundle_settings['translatable'])) {
// Store whether a bundle has translation enabled or not.
translation_entity_set_config($entity_type, $bundle, 'enabled', $bundle_settings['translatable']);
core/modules/translation_entity/translation_entity.admin.inc
for example, function _translation_entity_form_language_content_settings_form_alter
Discuss.
Document.
Discuss if there is a need to make the UI more consistant, if so, open an issue.
TBD
TBD
Active
10.1 ✨
(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.
This is still a relevant issue. Adding the term language-alterable which I encountered recently.