![drupal entity tranlsations translate tab drupal entity tranlsations translate tab](https://www.drupal.org/files/project-images/Screen%20Shot%202013-09-03%20at%207.55.05%20PM.png)
'access arguments' =>, 'edit form' => 'custom_entity', 'view path' => 'custom_entity/%custom_entity', 'edit path' => 'custom_entity/%custom_entity/edit', ], ], 'access callback' => 'custom_entity_translation_tab_access', // This depends on the translate path used above. 'translate path' => 'custom_entity/%'custom_entity/translate', // Access Callback to check access to translate tab. 'base path' => 'custom_entity/%custom_entity', // Translate path to be used.
DRUPAL ENTITY TRANLSATIONS TRANSLATE TAB UPDATE
So, find hook_entity_info implemented for the custom entity in your custom module and update ‘entity keys’ key of the entity info array to include ‘language’ as well: 'entity keys' =>, Also, additionally we need to provide more related information to the entity info array at top level (similar to ‘entity keys’) as: 'uri callback' => 'entity_class_uri', 'translation' =>, // Base path of the custom entity. In order to achieve this we need to let our Drupal know of this new power of “Multilingual Support” using Entity API. Step 2: Update hook_entity_info - entity keys & translation
![drupal entity tranlsations translate tab drupal entity tranlsations translate tab](https://www.drupal.org/files/et-ui-s007-source%20language%202012-10-03_1321.png)
And if the module already exists, provide hook_update to do so using db_add_field. Something like this: 'language' =>, Add this to the update hook_schema of the custom entity. We need to add a language column to the custom entity table to save the original language of the entity. Step 1: Add a language column in the custom entity table So let’s see how we can extend translation support for a custom entity in Drupal 7. But custom entity is not translation ready by default. As developers, we have the flexibility in Drupal to create custom entities as per our requirements, and hence it's our responsibility to extend all the Drupal features to these custom built entities together with maintaining the great UX that Drupal already has. But Drupal is not just limited to these entities. General translation of Drupal content, including node, taxonomy, menu, built-in interface, configuration (variables), is achieved easily by using these modules. (Read More: Quora: Difference between Content and Entity Translation Drupal Stackexchange: Difference between Content and Entity Translation ) The combination of these contrib modules helps us bring multilingual power to our Drupal Platform.
![drupal entity tranlsations translate tab drupal entity tranlsations translate tab](https://www.drupal.org/files/images/Screen%20Shot%202012-03-22%20at%206.11.04%20PM.jpg)
![drupal entity tranlsations translate tab drupal entity tranlsations translate tab](https://www.drupal.org/files/et-ui-p120-s09-confirmBatch-2012-10-16_0024.png)
Also, don’t forget, if you’re using entity translation, you need to use the Title module to add support for translatable titles. On the other hand, Entity Translation works together with the Field Translation module shipped under the Internationalization module to translate fields of a node and is the recommended way to internationalize comment. To be brief, Content Translation creates a new node when a node is translated and is the historic way to translate content. Entity Translation Content Translation vs Entity Translation As you might know, Drupal 7 has two major ways which can help you achieve multilingual functionality: 1. Drupal 8 includes the multilingual package in the core itself, while Drupal 7 requires some extra amount of effort to build this package as a whole to make Drupal multilingual ready. The multilingual feature is one of the prime reasons that Drupal is a distinguished and a preferred solution to achieve business goals. Drupal 7 core, together with Drupal contrib (), has the ability to ship a powerful platform for our digital requirements in the enterprise world.