You are here

function _weather_es_city_name in Weather_es 6.2

Same name and namespace in other branches
  1. 6 weather_es_parser.inc \_weather_es_city_name()

Adopt the city-name to AEMET...

1 call to _weather_es_city_name()
_weather_es_retrieve_data in ./weather_es_parser.inc
Get the data from AEMET

File

./weather_es_parser.inc, line 431
Gets the data from the AEMET web

Code

function _weather_es_city_name($city) {
  $convert_to = array(
    'a',
    'e',
    'i',
    'o',
    'u',
    'n',
    '-',
    '-',
    '-',
    '-',
  );
  $convert_from = array(
    'á',
    'é',
    'í',
    'ó',
    'ú',
    'ñ',
    '/',
    ', ',
    ' ',
    '\'',
  );
  return str_replace($convert_from, $convert_to, $city);
}