Jump to content

Change behaviour of the PageNameURL generator for German umlaute

Go to solution Solved by horst,

Recommended Posts


while setting up my first ProcessWire site, I ended up with a very specific problem: The PageNameURL does not consider German umlaute when using the page title to generate the page's URL name.

In written German, ae, oe, ue and ss serve as substitutes for the umlaute (mutated vowels) ä, ö, ü and ß, if the actual umlaut cannot be used. As far as I know this is a specific German thing, since other languages use the regular o instead of ø or a instead of å.

So here's what happens, if I put some German words in the page title:

Page Title: Falsches Üben von Xylophonmusik quält jeden größeren Zwerg.

Generated Page URL: falsches-uben-von-xylophonmusik-qualt-jeden-gro-eren-zwerg

(correct form: falsches-ueben-von-xylophonmusik-quaelt-jeden-groesseren-zwerg)


Since I'm quite new to ProcessWire, I can't figure out where to change the PageNameURL generator's behaviour. I guess two changes will need to be done, one for JavaScript and one in the PHP scripts.

Thanks a lot!


  • Like 1
Link to post
Share on other sites

Great, thank you very much for your help, WillyC and horst! This is exactly what I was looking for. Thank you for the instructions.

I would like to see the correct entries for German umlaute as a standard for German language installations of ProcessWire (though it might be difficult since it's not in the language files). Is there a wishlist?


Link to post
Share on other sites

The third forum down is literally called wishlist :P

It has been suggested before to make add the German umlauts as defaults, which won’t happen because plenty other languages use ä, ö, ü, and they use the normal trema-less characters instead of the German -e combinations. Not sure why ß isn’t in there, though.

Well, that was too easy... Must have read "wishlist" several times when scrolling the forums, but just didn't realise...

I understand that there's a letter ä in several languages (earlier this day Wikipedia blew my mind when I checked how many alphabets are using it). That's why I thought of setting a rule only for those installations using the German language files. But that is too difficult to integrate, I suppose.

Thanks, Martijn, for suggesting the ß-ss-thing!

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By mr-fan
      Like title says i've some domains with umlauts öäüß and i'd like to redirect them to the non umlaut version
      http://my-domän.de to http://my-domaein.de
      i've somethings like this in my htacess:
      ##redirect umlautdomain (not my domain) RewriteCond %{HTTP_HOST} ^xn--mhldorf-nsb.d$ [NC] RewriteRule ^(.*)$ http://muehldorf.de//$1 [R=301,L] in my config.php i only have muehldorf.de in my hosts list...
      is there something that i've misunderstood? so far it doesn't work....but may the htaccess rules take some time to exicute...i tried since about an hour some different rules.
      regards mr-fan
    • By fbg13
      I'm trying to create a new page through a file outside of the PW system.
      require('path/to/index.php'); $p = new Page(); $p->template = 'basic-page'; $p->parent = '/about/'; $p->title = 'Title'; $p->save(); Error:
      Echoing $wire->config->urls->assets works.
      I'm executing the code from the command line.
    • By jrtderonde
      Hi all,
      I am using Processwire to synchronize Albums form a Facebook Page into Processwire. Works like a charm! I'm using two loops to synchronize the albums
      One loop that creates a page that stands for the "album" One loop that stores every image within the album as a child of the "album" I experienced that this loop however only synchronizes the first 25 images. I was wondering, is there any kind of limitation that comes with the page creation API? I used the following script as posted before by Ryan if I'm not mistaking
      $p = new Page(); $p->template = "fb_image"; $p->parent = $pages->get("name=$id"); $p->title = $hash; $p->name = $hash; $p->save(); $p->fb_image = $image["images"][0]["source"]; $p->save(); Hope someone has the answer!
    • By marc1n
      Ryan once said that PW will take care of creating a name for me and it will also number-increment the name (i.e. "page-name-2") if one already exists. But when I create in admin UI a new page with name 'test' (page with that name already exists) and click "Save" button I've got an error:
      Session: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'test-1100' for key 'name_parent_id'
       TemplateFile: Unknown page
      My new page and its fields data is lost!
      It is a bug or a feature?
      I use PW 2.5.26.
  • Create New...