Manages content translations.

Translations are managed in sets of posts, which represent the same information in different languages. Only content types for which the administrator has explicitly enabled translations could have translations associated. Translations are managed in sets with exactly one source post per set. The source post is used to translate to different languages, so if the source post is significantly updated, the editor can decide to mark all translations outdated.

The node table stores the values used by this module:

  • tnid: Integer for the translation set ID, which equals the node ID of the source post.
  • translate: Integer flag, either indicating that the translation is up to date (0) or needs to be updated (1).

File

core/modules/translation/translation.module

Functions

Namesort descending Description
translation_admin_paths Implements hook_admin_paths().
translation_autoload_info Implements hook_autoload_info().
translation_config_info Implements hook_config_info().
translation_form_node_form_alter Implements hook_form_BASE_FORM_ID_alter() for node_form().
translation_form_node_type_form_alter Implements hook_form_FORM_ID_alter() for node_type_form().
translation_language_switch_links_alter Implements hook_language_switch_links_alter().
translation_menu Implements hook_menu().
translation_node_get_translations Gets all nodes in a given translation set.
translation_node_insert Implements hook_node_insert().
translation_node_predelete Implements hook_node_predelete().
translation_node_prepare Implements hook_node_prepare().
translation_node_update Implements hook_node_update().
translation_node_validate Implements hook_node_validate().
translation_node_view Implements hook_node_view().
translation_path_get_translations Returns the paths of all translations of a node, based on its Backdrop path.
translation_permission Implements hook_permission().
translation_remove_from_set Removes a node from its translation set and updates accordingly.
translation_supported_type Returns whether the given content type has support for translations.
translation_views_api Implements hook_views_api().
_translation_tab_access Access callback: Checks that the user has permission to 'translate content'.

Constants

Namesort descending Description
TRANSLATION_ENABLED Identifies a content type which has translation support enabled.