function module_globallink_is_node_translatable in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.7 globallink.api.php \module_globallink_is_node_translatable()
- 7.5 globallink.api.php \module_globallink_is_node_translatable()
By implementing this hook, you can programmatically filter out if a particular node is translatable or not by displaying/hiding it on the Send For Translation dashboard. If the node is not translatable, this method should not return anything (not even false) and the node will not show up on the dashboard.
Parameters
object $node: The node object on which this check is being performed.
string $target_drupal_locale: The target language code is only passed if the target language filter is selected on the dashboard. Defaults to NULL.
Return value
bool TRUE if the node is translatable.
File
- ./
globallink.api.php, line 24 - This file provides an example for the implementation of hooks that other modules can implement. Please read documentation for more details.
Code
function module_globallink_is_node_translatable($node, $drupal_target_locale = NULL) {
if ($node->type == 'article') {
return TRUE;
}
elseif ($drupal_target_locale != NULL && $drupal_target_locale == 'fr') {
return TRUE;
}
}