Check if the user has permissions to translate a node.
$node: Node being checked.
$account: User object to check translation permissions.
TRUE if the user can translate a node, FALSE otherwise.
function translation_user_can_translate_node($node, $account = NULL) {
// If no user object is supplied, the access check is for the current user.
if (empty($account)) {
$account = $GLOBALS['user'];
}
return node_access('view', $node, $account) && (user_access('translate all content', $account) || $node->uid == $account->uid && user_access('translate own content', $account));
}