--- weather.module 2009-01-05 08:57:04.000000000 -0500 +++ weather.new.module 2009-01-09 11:40:35.812500000 -0500 @@ -766,7 +766,8 @@ function weather_custom_block_form($dumm '#title' => t('Temperature'), '#default_value' => $config['units']['temperature'], '#options' => array('celsius' => t('Celsius'), 'fahrenheit' => t('Fahrenheit'), - 'dont-display' => t('Don\'t display')), + 'fc' => t('Fahrenheit / Celsius'), 'cf' => t('Celsius / Fahrenheit'), + 'dont-display' => t('Don\'t display')), ); $form['units']['windspeed'] = array( '#type' => 'select', @@ -1472,11 +1473,20 @@ function _weather_format_temperature($te $result['temperature'] = t('!temperature °F', array('!temperature' => $temperature['fahrenheit'])); } - else { - // default to metric units + elseif ($unit['temperature'] == 'celsius') { $result['temperature'] = t('!temperature °C', array('!temperature' => $temperature['celsius'])); } + elseif ($unit['temperature'] == 'fc') { + $result['temperature'] = t('!temperaturef °F / !temperaturec °C', + array('!temperaturef' => $temperature['fahrenheit'], + '!temperaturec' => $temperature['celsius'])); + } + elseif ($unit['temperature'] == 'cf') { + $result['temperature'] = t('!temperaturec °C / !temperaturef °F', + array('!temperaturef' => $temperature['fahrenheit'], + '!temperaturec' => $temperature['celsius'])); + } return $result; }