You are here

function _spamicide_get_description in Spamicide 6

Same name and namespace in other branches
  1. 5 spamicide.module \_spamicide_get_description()
  2. 7 spamicide.inc \_spamicide_get_description()

Show translation if available

@todo change $default to be able to change it in the admin interface with the possibility of adding per form default description

Parameters

$lang_code:

Return value

translated field description

1 call to _spamicide_get_description()
spamicide_form_alter in ./spamicide.module
Implementation of hook_form_alter

File

./spamicide.module, line 481
This module provides yet another tool to eliminate spam.

Code

function _spamicide_get_description($lang_code = NULL) {
  global $language;
  $lang_code = isset($lang_code) ? $lang_code : $language->language;
  $default = t('To prevent automated spam submissions leave this field empty.');
  if (module_exists('locale')) {
    $description = variable_get("spamicide_description_{$lang_code}", $default);
  }
  else {
    $description = variable_get('spamicide_description', $default);
  }
  return $description;
}