Configure entity translation
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
To set up entity translation there are a number of global configuration changes to make:
Detection and selection
When the Entity translation module is enabled, a new 'Content language detection' section will appear on the language 'Detection and selection' page at Administration > Configuration > Regional and language > Languages > Detection and selection (admin/config/regional/language/configure
).
The 'User interface text language detection' section allows you to configure how the language of the user interface is determined. Content and interface languages are not necessarily the same, so this second section ('Content language detection') provides a way to determine the language in which content should be displayed. For most use cases, the language of the content should match the language of the user interface. Enabling the 'Interface' detection method and dragging it to the top of the list of methods will achieve this, when possible. To ensure that the language switcher correctly updates the language of the site, the 'URL' method must also be enabled.
Enable a different language switcher
When the Entity translation module is installed, a second language switcher block is made available on the site called Language switcher (Content). Enabling this block at Administration > Structure > Blocks (admin/structure/block) rather than the default language switcher block, Language switcher (User interface text), will ensure that the language of the content is updated when the language switcher is used.
Customize the language switcher
At the time of writing, the language switcher displays links to all possible translations without checking if the translation actually exists. This behavior can be altered by implementing "hook_language_switch_links_alter".
Translatable entity types
You can select which entity types should be translatable via the Entity translation admin page at Administration > Configuration > Regional and language > Entity translation (admin/config/regional/entity_translation
). By default, only nodes have entity translation enabled. You can also enable entity translation for comments, users, taxonomy terms, and any other 'fieldable' entities on the site. Note, though, entity translation might not work with some contributed or custom 'fieldable' entities, so testing in a development environment is required for any non-core entities.
Entity Translation UI (7.x-1.0-beta2)
Language fallback
This setting allows you to configure whether or not untranslated content will appear in the original language as a fallback. If this option is disabled, fields that are translatable but have not been translated to the current language will not appear. This is a global setting that will apply to all content with entity translation enabled.
Workflow permissions
Under the entity translation settings, you will find an option to enable translation workflow permissions. By doing this it will be possible to limit the access to the entity form elements: every role previously allowed to access the entity form will need to be granted the Edit original values permission to edit the entity in the original language. Moreover, form elements dealing with values shared across the translations will be visible only to roles having been granted the Edit shared values permission.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion