Implements hook_entity_info_alter().
function custom_block_entity_info_alter(&$types) {
// Add a translation handler for fields if the language module is enabled.
if (module_exists('language')) {
$types['custom_block']['translation']['custom_block'] = TRUE;
}
}