felted Posted August 14, 2018 Posted August 14, 2018 Hello, i would like to convert germand Umlaute url-conform. ü = ue ä = ae usw... I use this code: $tmp = $sanitizer->pageName("Über", true); But the output for über is: ber And the output für Größe is: gre Can anyone help me? Greetings and thank you, Detlef
dragan Posted August 14, 2018 Posted August 14, 2018 check under /module/edit?name=InputfieldPageName and add as many replacements as you need
Klenkes Posted August 14, 2018 Posted August 14, 2018 Go to Modules / Core / Page Name and add to Character replacements: ä=ae ö=oe ü=ue Save and check if it's still there. (in my case I always have to add it twice) I honestly don't know why it isn't there already...
horst Posted August 14, 2018 Posted August 14, 2018 1 hour ago, Klenkes said: I honestly don't know why it isn't there already... Because there are many languages that uses those chars. Means: these are not only "german umlauts", this is used in multiple languages. And those languages all reduce the chars to a single char, (ä -> a, ö -> o, ü -> u). So, the usage in german language, changing it to a char with a trailing e, is in the minority here. ? 3
Robin S Posted August 14, 2018 Posted August 14, 2018 8 hours ago, felted said: But the output for über is: ber And the output für Größe is: gre I get different results. Using the Sanitizer::translate constant in the second argument means the sanitizer will use the character replacements defined in the InputfieldPageName module settings. So if you only need to account for the German language you can edit the replacements for ü, etc, to achieve a result like that shown above. 1 1
felted Posted August 15, 2018 Author Posted August 15, 2018 I found the problem ? I saved the document with codierung CP1252.After chanching to UTF-8 everything is fine. Thanks for your help! Detlef
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now