Transliteration on a German page for entities with no language set

Created on 1 March 2020, over 5 years ago
Updated 22 May 2025, 3 months ago

Hi,

we defined a custom entity type which has no language property. It is the entity "Politician" where the single politician has a first name and a last name. These values are always the same in each language. For these entities we have a canonical url and we want to create aliase with pathauto for these entities.

No it comes that politicians with German umlauts are not transliterated correctly: "Florian Köhler" becomes "florian-kohler" bit it should become "florian-koehler". This issue only appears with these entities not with nodes for example where the node title is part of the alias.

I found that in PathautoGenerator->createEntityAlias() there is this code

$langcode = $entity->language()->getId();

In the case of our entities it returns "und" and this leads to a non-German transliteration logic during the further process. Is there any way to say "This is a German page and always turn ü to ue even if the entity itself does not have set German as a language"?

Best,
Tobias

💬 Support request
Status

Active

Version

1.6

Component

Code

Created by

🇩🇪Germany tobiberlin Berlin, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024