The functionality of this module was added to Drupal core, making this module obsolete from Drupal version 10.2 onward. The module can still be used on older versions of Drupal 8, 9 and 10.

Change Record #3415426: Filename Transliteration contrib module is deprecated in favor of new functionality from Drupal core >=10.2

tl;dr - Configure filename sanitization settings in Drupal 10.2+ at /admin/config/media/file-system and uninstall this module.

A helper module to enable basic transliteration for all uploaded File Entities. Works on Drupal 8, 9 and 10.1.

Filename sanitization includes:

  • Transliteration - Special characters are converted from UTF8 to ASCII using Drupal core's PhpTransliteration::transliterate functionality.
  • Downcasing - Capital letters are lowercased.
  • Underscores as separators - Anything that is not a valid filename character (including the space character) is replaced with an underscore.
  • Reduce duplicate separators - Sequences of underscores, dashes, and periods are simplified to a single character.

Note: Sanitization only impacts new file uploads; all files already uploaded to a site are not affected.

Why does this module exist?

While transliteration functionality was ported into Drupal 8 core, there was no support for filename transliteration between Drupal 8 through Drupal 10.1. Now that Drupal 10.2 is released, this module will be minimally maintained and will become obsolete when Drupal 11 is released and Drupal 10 reaches EOL. See #3238461: Deprecate Filename Transliteration in favor of core functionality (>=10.2) and #2492171: Provide options to sanitize filenames (transliterate, lowercase, replace whitespace, etc) for additional information.

Similar modules

This module has very similar functionality as Transliterate filenames for uploads. Please read #3216907: How is this module different from transliterate_filenames ? for an in-depth analysis and comparison.

Configuration

The module currently has no configuration or UI. Feature requests and merge
requests welcome.

Credits

This module is based on a now deleted blog post by Alexander Belov from Buzzwoo.de, simplified for a less specific use case.

Project information

Releases