function stringoverrides_help in String Overrides 6
Same name and namespace in other branches
- 5 stringoverrides.module \stringoverrides_help()
- 7 stringoverrides.module \stringoverrides_help()
Implementation of hook_help()
File
- ./
stringoverrides.module, line 11 - Configuration interface to provide a quick and easy way of replacing text.
Code
function stringoverrides_help($path, $arg) {
$output = '';
if ($path == 'admin/help#stringoverrides') {
$output = '<p>' . t('The <strong>String Overrides</strong> module provides a quick and easy way of replacing text.') . '</p>';
$output .= '<p>' . t('To replace a string, enter <strong>the complete string</strong> that is passed through the <a href="@t">t()</a> function. String Overrides cannot translate user-defined content, it can only replace strings wrapped in the t() function. To find the strings you can actually change, open up a module and look for t() function calls. Places where %, @, or ! are used means that the translation contains dynamic information (such as the node type or title in the above examples); these are not translated while the text around them is.', array(
'@t' => 'http://api.drupal.org/api/function/t',
)) . '</p>';
$output .= '<p>' . t('For example:') . '</p>';
$output .= theme('item_list', array(
'"The %post has been updated." → "You just updated the %post."',
'"Are you sure you want to delete %title?" → "Do you want to delete %title?"',
));
$output .= '<p>' . t('Remember, you must replace the entire string, not just a portion of it.') . '</p>';
}
else {
if ($arg[0] == 'admin' && $arg[1] == 'settings' && $arg[2] == 'stringoverrides') {
switch ($arg[3]) {
case 'import':
$output = '<p>' . t('Upload a *.po file here to import a collection of strings.') . '</p>';
break;
case 'export':
$output = '<p>' . t('The following is a generated *.po file. You can use this feature to backup the current String Overrides.') . '</p>';
break;
case NULL:
$output = '<p>' . t('The following provides a quick and easy way of replacing text.') . '</p>';
break;
default:
if (module_exists('locale')) {
$lang = locale_language_name($arg[3]);
$output = '<p>' . t('The following provides a quick and easy way of replacing text in @lang.', array(
'@lang' => $lang,
)) . '</p>';
}
break;
}
}
}
return $output;
}