Hi, i try to exchange the Umlaute [‘ä’, ‘ö’, ‘ü’] with [‘ae’, ‘oe’, ‘ue’]
i do it in my ArticlesTable.php
```
public function beforeSave(EventInterface $event, $entity, $options)
{
if ($entity->isNew() && !$entity->slug) {
$sluggedTitle = Text::slug($entity->title);
// trim slug to maximum length defined in schema
$entity->slug = substr($sluggedTitle, 0, 191);
}
But the problem is that the Umlaute are not exchanged correctly… an ä will become an a and an ü will become an u and so on but i need an ä to become an ae…
There is no transliterate option (and no lowercase for that matter), but a transliteratorId one, which can be either null to use the default transliterator (which can be changed globally via Text::setTransliteratorId() or Text::setTransliterator()), a transliterator ID string, or a transliterator object.
The default transliterator ID is defiend as Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove, which doesn’t include umlaut transliteration. You’d have to add de-ASCII; which holds rules for transforming umlauts:
If you want this to apply everywhere as the default, just set the default transliterator at bootstrapping time:
Text::setTransliteratorId($transliteratorId);
Note that de-ASCII does not have rules to transform the currency symbol, and IIRC there aren’t any that include it, so you’d had to create a custom rule if you need to transform that too:
Also in case your ICU version isn’t up to date, meaning pre 60 IIRC, then de-ASCII isn’t included, and you’d have to create the rules for that manually as well: