Created
August 4, 2014 15:55
-
-
Save allgood2386/4e80f475e1753ed3b836 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file translation_form_changes.module | |
* TODO: Enter file description here. | |
*/ | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function translation_form_changes_form_alter(&$form, &$form_state, $form_id) { | |
drupal_set_title(t('Second Language for ') . $form['node']['#value']->title); | |
} | |
function translation_form_changes_module_implements_alter(&$implementations, $hook) { | |
if ($hook == 'translation_help' && is_array($implementations)) { | |
unset($implementations['translation_help']); | |
} | |
} | |
/** | |
* Implements hook_help(). | |
*/ | |
function translation_form_changes_help($path, $arg) { | |
switch ($path) { | |
case 'admin/help#translation': | |
$output = 'This is my replacement string'; | |
return $output; | |
case 'node/%/translate': | |
$output = '<p>' . t('Translations of a piece of content are managed with translation sets. Each translation set has one source post and any number of translations in any of the <a href="!languages">enabled languages</a>. All translations are tracked to be up to date or outdated based on whether the source post was modified significantly.', array('!languages' => url('admin/config/regional/language'))) . '</p>'; | |
return $output; | |
} | |
} | |
function translation_form_changes_menu_alter(&$items) { | |
sdpm($items); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment