translation.module

Version 1.64 (checked in on 2009/11/08 at 10:02:41 by webchick)

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 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' is the translation set id, which equals the node id of the source post.
  • 'translate' is a flag, either indicating that the translation is up to date (0) or needs to be updated (1).

Constants

NameDescription
TRANSLATION_ENABLEDIdentifies a content type which has translation support enabled.

Functions

NameDescription
translation_form_alterImplement hook_form_alter().
translation_form_node_type_form_alterImplement hook_form_FORM_ID_alter().
translation_helpImplement hook_help().
translation_language_switch_links_alterImplement hook_language_switch_link_alter().
translation_menuImplement hook_menu().
translation_node_deleteImplement hook_node_delete().
translation_node_get_translationsGet all nodes in a translation set, represented by $tnid.
translation_node_insertImplement hook_node_insert().
translation_node_prepareImplement hook_node_prepare().
translation_node_updateImplement hook_node_update().
translation_node_validateImplement hook_node_validate().
translation_node_viewImplement hook_node_view().
translation_path_get_translationsReturn paths of all translations of a node, based on its Drupal path.
translation_permissionImplement hook_permission().
translation_remove_from_setRemove a node from its translation set (if any) and update the set accordingly.
translation_supported_typeReturns whether the given content type has support for translations.
_translation_tab_accessMenu access callback.
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.