You are here

function hook_transliteration_clean_filename_prepare_alter in Transliteration 7.3

Alters a file name before transliteration and sanitization.

Parameters

string &$filename: The file name before being parsed by transliteration.

string $source_langcode: Optional ISO 639 language code that denotes the language of the input.

See also

transliteration_clean_filename()

1 invocation of hook_transliteration_clean_filename_prepare_alter()
transliteration_clean_filename in ./transliteration.module
Transliterates and sanitizes a file name.

File

./transliteration.api.php, line 18
Documents Transliteration's hooks for api reference.

Code

function hook_transliteration_clean_filename_prepare_alter(&$filename, $source_langcode) {
  $filename = drupal_strtolower($filename);
  $filename = str_ireplace(array(
    '& ',
    '& ',
  ), 'and ', $filename);
}