Changes for German website
Permalink Browser Info Environment
Hello!
I'm using the "Location Map" app in a German website. How can I make the Info Window display the zip code in front of the city as it is usual in German addresses?
Where can you change headings and predefined texts into German, e.g. in the Info Window I would like to change "Smartphone:" in "Telefonnr.:"?
In addition, when entering a German address in "Map Locations", the position of the marker is not set automatically, you always have to do this manually. Is there any way to change that?
best regards
Gert
I'm using the "Location Map" app in a German website. How can I make the Info Window display the zip code in front of the city as it is usual in German addresses?
Where can you change headings and predefined texts into German, e.g. in the Info Window I would like to change "Smartphone:" in "Telefonnr.:"?
In addition, when entering a German address in "Map Locations", the position of the marker is not set automatically, you always have to do this manually. Is there any way to change that?
best regards
Gert
Type: | Pre-Sale |
---|---|
Status: | Resolved |
Hello,
If I install the new "view.php" as you suggest, I get the following error message when I call the map: "Call to undefined method Concrete \ Core \ Block \ View \ BlockView :: getAddress2 ()" (no map is visible)
I now use a key with Geocoding API, but there's still no automatic Geo detection for the usual locations' adresses. I registered the "Brandenburg Gate" in Berlin as a landmark, that worked, the position was entered automatically.
A typical address used in the site would be:
Niederlassung Bayreuth ("Location Name")
Transfer GmbH & Co. KG ("Adress 1")
Nibelungenstraße 32 ("Adress 2")
95444 Bayreuth ("Postcode" and "City")
In the first line is the branch office, then the name of the company. The two lower lines are the streetname with house number and the postal code with the corresponding city.
It is possible that some branch offices of the company are not already registered in Google Maps. Could this prevent detection, or is street and city sufficient for it?
bye
Gert
If I install the new "view.php" as you suggest, I get the following error message when I call the map: "Call to undefined method Concrete \ Core \ Block \ View \ BlockView :: getAddress2 ()" (no map is visible)
I now use a key with Geocoding API, but there's still no automatic Geo detection for the usual locations' adresses. I registered the "Brandenburg Gate" in Berlin as a landmark, that worked, the position was entered automatically.
A typical address used in the site would be:
Niederlassung Bayreuth ("Location Name")
Transfer GmbH & Co. KG ("Adress 1")
Nibelungenstraße 32 ("Adress 2")
95444 Bayreuth ("Postcode" and "City")
In the first line is the branch office, then the name of the company. The two lower lines are the streetname with house number and the postal code with the corresponding city.
It is possible that some branch offices of the company are not already registered in Google Maps. Could this prevent detection, or is street and city sufficient for it?
bye
Gert
Hi Gert,
my apologies, I had missed two lines where I needed to make a change. I've attached an updated view.php that should fix the error you are seeing.
With the address lookup, I would suggestion not using the name of the company as Address 1, instead put the street number and name as the Address 1 value. I've found myself that address lookups don't tend to work well with the actual business/company names involved.
Let me know if you have success with doing it that way - I'm happy to look into things further.
-Ryan
my apologies, I had missed two lines where I needed to make a change. I've attached an updated view.php that should fix the error you are seeing.
With the address lookup, I would suggestion not using the name of the company as Address 1, instead put the street number and name as the Address 1 value. I've found myself that address lookups don't tend to work well with the actual business/company names involved.
Let me know if you have success with doing it that way - I'm happy to look into things further.
-Ryan
Hello!
Thanks for the tip with the address. Without the company name the position detection has worked.
Can the location map content in the dashboard area also be translated into German somewhere (e.g. the 'Edit Location' form)?
I would also like to add: You offer an excellent service.
Greetings
Gert
Thanks for the tip with the address. Without the company name the position detection has worked.
Can the location map content in the dashboard area also be translated into German somewhere (e.g. the 'Edit Location' form)?
I would also like to add: You offer an excellent service.
Greetings
Gert
Hi Gert, glad to hear you've got the position detection working.
With the translation of the dashboard, it's actually a lot of work to create a translation and package it into the package itself - it's possible, but someone would need to supply translations for every piece of text.
However, if you are just wanting to translate a few dashboard pages you can override them and edit them however you like:
- create /application/single_pages/dashboard/map_locations/locations/view.php
- Copy into view.php the code from: /packages/msv_location_map/single_pages/dashboard/map_locations/locations/view.php
- Change the content in the view.php file in the application folder (and clear your cache)
The same goes for any of the other dashboard pages.
-Ryan
With the translation of the dashboard, it's actually a lot of work to create a translation and package it into the package itself - it's possible, but someone would need to supply translations for every piece of text.
However, if you are just wanting to translate a few dashboard pages you can override them and edit them however you like:
- create /application/single_pages/dashboard/map_locations/locations/view.php
- Copy into view.php the code from: /packages/msv_location_map/single_pages/dashboard/map_locations/locations/view.php
- Change the content in the view.php file in the application folder (and clear your cache)
The same goes for any of the other dashboard pages.
-Ryan
To customise the way the map markers display, this would be a case of overriding the block template. You would:
- create a folder under /application/blocks/msv_location map
- copy into that the view.php file from /packages/msv_location_map/blocks/msv_location/view.php
- Make changes to the code in the new view.php file
However, as the address formatting requires some extra coding I've made this change for you already and have attached the file (as a zip). If I have misunderstood how German addresses should display, you can adjust this on line 61 and 127.
The other changes you may need to make to the template should be easy to find.
With the Google lookup of the address, this might not be finding addresses because it also tries to look them up with the zip code last. Could you give me an example address for me to try? Does it work with other addresses, such as major landmarks?
If it doesn't work at all, you may need to check your API key settings. It needs BOTH the Google Maps JavaScript API, and the Google Maps Geocoding API enabled. (I often forget the second one!)
Cheers
-Ryan