You are here

function i18n_string_remove in Internationalization 7

Remove source and translations for user defined string.

Though for most strings the 'name' or 'string id' uniquely identifies that string, there are some exceptions (like profile categories) for which we need to use the source string itself as a search key.

Parameters

$name: String name

$string: Optional source string (string in default language). Array of string properties to remove

2 calls to i18n_string_remove()
i18n_block_block_delete_submit in i18n_block/i18n_block.module
Remove strings for deleted custom blocks.
i18n_block_update_strings in i18n_block/i18n_block.module
Update block strings

File

i18n_string/i18n_string.module, line 803
Internationalization (i18n) package - translatable strings.

Code

function i18n_string_remove($name, $string = NULL, $options = array()) {
  if (is_array($string)) {
    return i18n_string_multiple('remove', $name, $string, $options);
  }
  else {
    list($textgroup, $context) = i18n_string_context($name);
    return i18n_string_textgroup($textgroup)
      ->context_remove($context, $string, $options);
  }
}