You are here

function drush_stringoverrides_set in String Overrides 7

Drush Callback; Set a String Overrides.

File

./stringoverrides.drush.inc, line 143
Drush interface for String Overrides.

Code

function drush_stringoverrides_set($original, $replacement) {

  // Get the available options.
  $language = drush_get_option('language', 'en');
  $context = drush_get_option('context', '');

  // Load all the strings.
  $custom_strings = variable_get('locale_custom_strings_' . $language, array());
  $custom_strings[$context][$original] = $replacement;
  variable_set('locale_custom_strings_' . $language, $custom_strings);
  drush_print(dt('The string override has been set.'));
}