• Resolved gakradmin

    (@gakradmin)


    To correctly display a Google map incorporated in Italian, I had to add em-location.php to line 1152
    the ‘language’ => ‘it’ filter. So now the filter is.
    $ args = apply_filters (’em_location_google_maps_embed_args’, array (
    ‘maptype’ => ‘roadmap’,
    ‘zoom’ => 15,
    ‘key’ => get_option (‘dbem_google_maps_browser_key’),
    ‘language’ => ‘it’
    The file will be edited em-location.php if the plugin updates. Is there a better solution to solve this?

Viewing 1 replies (of 1 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    Instead of hacking into the core you can hook into the em_location_google_maps_embed_args filter

    e.g.

    
    add_filter('em_location_google_maps_embed_args','google_map_mod',100,1)
    function google_map_mod( $config ){
    	
    	$config = array(
    			'maptype' => 'roadmap',
    			'zoom' => 15,
    			'key' => get_option('dbem_google_maps_browser_key'),
    			'language' => 'it'
    		);
    	
    	return $config;
    }
    

    As for where to paste custom snippet – https://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

Viewing 1 replies (of 1 total)
  • The topic ‘Show Google Map in correct language’ is closed to new replies.