Deletes interface translation files and translation history records.
array $projects: Project names from which to delete the translation files and history. Defaults to all projects.
array $langcodes: Language codes from which to delete the translation files and history. Defaults to all languagues
boolean TRUE if files are removed sucessfully. FALSE if one or more files could not be deleted.
function locale_translate_delete_translation_files($projects = array(), $langcodes = array()) {
$fail = FALSE;
locale_translation_file_history_delete($projects, $langcodes);
// Delete all translation files from the translations directory.
if ($files = locale_translate_get_interface_translation_files($projects, $langcodes)) {
foreach ($files as $file) {
$success = file_unmanaged_delete($file->uri);
if (!$success) {
$fail = TRUE;
}
}
}
return !$fail;
}