Support » Plugin: Events Manager » Show Google Map in correct language

  • 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 – http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

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