Flipped slug rules on multilingual site

We’re working on a multilingual site with German and English translations. When using the slug field method or Str::slug in a snippet, umlaut rules are flipped.

Input

Büro für Gestaltung

Output

German: → buro-fur-gestaltung
English: → buero-fuer-gestaltung

Expected

German: → buero-fuer-gestaltung
English: → buro-fur-gestaltung

Interestingly, when I output the current language in the same snippet, Kirby returns the correct language settings, e. g. for German:

Kirby\Cms\Language Object
(
    [code] => de
    [default] => 1
    [direction] => ltr
    [locale] => Array
        (
            [0] => de_DE.uft-8
        )

    [name] => Deutsch
    [rules] => Array
        (
            [Ä] => AE
            [Ö] => OE
            [Ü] => UE
            [ß] => ss
            [ä] => ae
            [ö] => oe
            [ü] => ue
        )
)

This is happening on Kirby 3.4.4.
Anyone ever experienced anything similar?

Looks like those slug rules only apply to the page slug, not to the string methods. The string class uses its own ascii replacements and defaults.

See the source code for Str::slug() which is also used in the field method.

Okay, thanks for your feedback.
Do you know if that inconsistency is there for a reason or should this be considered a bug?

I think I didn’t think, my answer doesn’t make sense. Forget it all :see_no_evil:. If what I wrote was the case, then it wouldn’t work at all, not flipped.

Sounds like a bug to me.

I just tried replicating this with the Starterkit and it doesn’t flip there, it just defaults to the English rules. Very strange …

As @byybora pointed out on Github, this issue has already been fixed in the features branch and will be included in the next release :tada: