numero2 / contao-proper-filenames

Replaces special characters in filenames right after upload.
https://www.numero2.de/contao/erweiterungen/proper-filenames.html
GNU Lesser General Public License v3.0
13 stars 5 forks source link

Use slug generator #4

Closed fritzmg closed 4 years ago

fritzmg commented 4 years ago

Implements #3

This PR adds a new feature to the file renaming, using ausi/slug-generator. This way you can define the valid character set just like in the website root (and also add additional valid character sets globally via the appropriate event in Contao 4). 😃

Additionally you can set the locale for the slug generation, so that you could set it to German for instance, in order for Umlauts to be converted from ö to oe instead of o for example.

Note: the PR should be fully compatible with Contao 3. However, I have not tested it in Contao 3.

bennyborn commented 4 years ago

Thanks for the contribution. Everything looked fine and seems to work!