As a german user of CiviCRM, i would love to have geocoding for my addresses. But at the moment, it tells me:

Street address parsing is enabled but not supported by your locale (de_DE).

That's true, the core only supports following locals:

 $parsingSupportedLocales = ['en_US', 'en_CA', 'fr_CA'];

In some way it still works, but I get an info on each save of an adress, telling me it couldn't parse the address.

I would love to try to implement a extension for german address parsing. Is there any hook I can use for that?

I took a look at org.civicoop.streetformatnl but it's old code and overwrites the core function. And it gave me an error 500, using it with CiviCRM 5.20.1.

There are two main differences between american and german adresses:

  1. We write the house number after the street: <street> <number>
  2. We place the zip before the city name: <zip> <city>

Just a clarification first: Parsing is different from geocoding. If all you want is to get lat and long values filled in then regular google geocoding works without parsing.

If you really want parsing, then you might be able to do it with hook_civicrm_post and when $objectName == 'Address' you can parse and adjust the address there.

Note that just for display of zip before city you can alter that at Administer - Localization - Address Settings, but you probably have already seen that, and it doesn't rearrange the edit form, just for viewing and labels.

  • You are right! But it is a bit complex! :-D There are two ways for geocoding: 1. Geocoding on post: This works without parsing! 2. The "Cron Job" Address geocoder: That one gives an error without parsing: Error: You need to enable Street Address Parsing under Administer > Localization > Address Settings. For me, that solves my problem. I will just disable the "cron job". :-) – Tiggr Dec 29 '19 at 18:56

If you only need geocoding and no parsing, you can disable parsing by using the parameters in the geocoding scheduled task


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.