Finally managed to find some time to tackle this problem.
Used the following code in functions.php to use a #_COUNTRYCODE placeholder and have it replace by a country flag.
/* Add events manager placeholder for country code and output flag image */
add_filter( 'em_event_output_placeholder', 'nstrm_country_code_placeholder', 1, 3 );
function nstrm_country_code_placeholder( $replacement, $EM_Event, $result ) {
global $wp_query, $wp_rewrite;
switch ( $result ) {
case '#_COUNTRYCODE':
$location = em_get_location( $EM_Event->location_id );
$country_code = $location->location_country;
if ( '' != $country_code ) {
// generate flag url
$country_img = get_stylesheet_directory_uri() . "/images/flags/" . strtolower( $country_code . ".png" );
$country_html = '<span class="flag-wrap"><img class="flag" src="' . $country_img . '" /></span>';
}
$replacement = $country_html;
break;
}
return $replacement;
}