diff --git a/i18nstrings/i18nstrings.module b/i18nstrings/i18nstrings.module index f276c4a186a52859c8e2861bd8b2b3db623910b7..9f759fce607ece8f0a58adec05f8bc33f5cb2407 100644 --- a/i18nstrings/i18nstrings.module +++ b/i18nstrings/i18nstrings.module @@ -598,6 +598,16 @@ function i18nstrings_remove_string($context, $string = NULL) { } } +/** + * Remove a string translation for a given context and language. + */ +function i18nstrings_remove_translation($context, $langcode) { + $context = i18nstrings_context($context); + if ($source = i18nstrings_get_source($context)) { + db_query("DELETE FROM {locales_target} WHERE lid = %d AND language = '%s'", $source->lid, $langcode); + } +} + /** * Update context for strings. *