Support » Plugin: ACF-VC Integrator » Change output “view larger map” to german in google map

  • Resolved prinzwp

    (@prinzwp)


    I tried ACF in my theme impreza and its integration of ACF and CPT. But this did not work for frontendoutput of google map field. Trying acf-vc integrator brings the field to output on frontend. But the layout is’nt the same and it uses englisch instead of wanted german.
    How could I change and configure the output?

    • This topic was modified 3 weeks, 3 days ago by  prinzwp.
Viewing 12 replies - 1 through 12 (of 12 total)
  • prinzwp

    (@prinzwp)

    Looking at https://developers.google.com/maps/documentation/javascript/localization

    There are some infos:
    <script src=”https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&language=ja&region=DE”>
    </script>

    This takes the output to german.

    Some more from the google page:
    Region localization
    When you load the Maps JavaScript API from maps.googleapis.com it applies a default bias for application behavior towards the United States. If you want to alter your application to serve different map tiles or bias the application (such as biasing geocoding results towards the region), you can override this default behavior by adding a region parameter to the <script> tag when loading the Maps JavaScript API code.

    It would be best handling if the plugin uses the WP localizing (activated language) or use geo-location from google.

    • This reply was modified 3 weeks ago by  prinzwp.
    Plugin Author Frederik Rosendahl-Kaa

    (@frederik-rosendahl-kaa)

    Hi @prinzwp sorry for the late reply.

    Thanks for writing any solution to the problem.
    You are absolutely right that it will be smartest to use WP localizing, I will have a look at it and sent an update out as soon as possible.

    Best regards
    Frederik

    Take a look at google map info at
    https://developers.google.com/maps/documentation/javascript/localization

    There are two language settings:

    Localizing the Map

    You can customize your map for a specific country or region in the following ways:

    Change the default language settings.
    Specify a region code, which alters the map’s behavior based on a given country or territory.

    And:
    At last version the output of acf-vc-interator on frontend defers from the standard at google map demo.

    • This reply was modified 2 weeks, 5 days ago by  prinzwp.
    • This reply was modified 2 weeks, 5 days ago by  prinzwp.
    Plugin Author Frederik Rosendahl-Kaa

    (@frederik-rosendahl-kaa)

    Hi @prinzwp,
    I just want to let you know that I am rewriting the part of the plugin that has to do with google map.
    But that probably goes a week before I have an update out as the Maps JavaScript API does not have a built-in place card box which is in the upper left corner where there is some info about the location.
    And since it has been a standard for how the map has been displayed with this plugin I would like it to still be able to do it, if nothing else as something you can turn off.

    If you can’t wait for it then there is a filter hook called acfvc_google_map which you can use to change how the plugin should output the field.

    add_filter('acfvc_google_map','function_name',10,3);
    function function_name ( $output, $field, $post_id ) { 
    return $output;
    }

    Best regards
    Frederik

    Until now the plugin shows a map with the coordinates. But if there is a givven Name (registered at google maps) or/and an adress it would be very usefull if this would be shown left top in the map instead of the coordinates.

    Plugin Author Frederik Rosendahl-Kaa

    (@frederik-rosendahl-kaa)

    Hi @prinzwp,
    Yes I know it only shows coordinates, but there are still some who use it (probably not many) and for them I don’t just want to remove the placecard.

    But I just released a version 1.8 where I have updated the code to use google maps api and there are settings so you can turn off the various control features on the map.

    Best regards
    Frederik

    Hi Frederik,

    today I made the update to the new version 1.8 – and after this it displqys the content from the acf-field from google-maps in frontend.
    But there are two qustions now:
    1. After adjusting and saving the maps configuration in the plugin-configuration section, all predefines are set to no from yes.
    This means: they are not saved?
    2. On frontendoutput I see “view larger map”. How can I change the language to grman for all output? There is’nt used a local language or the language settings from wordpress.

    Plugin Author Frederik Rosendahl-Kaa

    (@frederik-rosendahl-kaa)

    Hi @prinzwp,
    1. There was an error that caused the default option fields for google map to display incorrect info after saving, I released a new update version 1.8.1 where the problem is resolved.
    2. Since place card is not a standard part of google map api, you will need to translate that part using plugin as loco translate or a program like poedit to translate with.
    The plugin uses the site language that you have set under the wordpress settings

    Best regards
    Frederik

    Hi Frederik,

    saving works (after deleting cache!).

    But translation via plugin some words of a google api?

    I’ve talked about this above: google has two keys to set localizing the output.
    The key should be implemented in the hook…?!

    (My WP language is set to german – your plugin is in englisch.)

    Plugin Author Frederik Rosendahl-Kaa

    (@frederik-rosendahl-kaa)

    Hi,
    Yes by default the plugin is English, but it can be easily translated.

    The plugin makes use of what language wordpress is set to.
    I tested the language on the map by changing my WordPress installation to 5 different languages ​​where one is German and every time I changed the language the map language was changed.
    The only part that will not be translated is in the placecard which contains “view larger map” and “directions”.
    This part I had to find a solution for myself as google map api not supported placecard and I do not want to remove it from map.
    Therefore, it needs to be translated as I mentioned earlier using a program to edit po, mo files or a plugin like loco translate.
    These 2 solutions I also have tested.

    Then it is possible that you could possibly send some screenshots of your settings in relation to wordpress language, plugin settings and how it looks frontend.
    Since I can’t quite understand why it doesn’t work for you.

    I also put this thread as not solved again.

    Best regards
    Frederik

    Hi Frederik,

    your maps-integration works best!
    All language is as wanted (German) with exception of placecard.
    Because of this next time I disable the placecard, because the info is displayed from separate acf-fields above the map.

    Many thanks for your steps to a better working plugin!
    5 Stars!

    Plugin Author Frederik Rosendahl-Kaa

    (@frederik-rosendahl-kaa)

    Thank you and feel free to open a new support case if you experience any other issues or suggestions for improvement.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.