Closed Wibbmer closed 1 month ago
On that note, I have added a localized version of the directions for German de
in private function directions($locale)
of ConversionTrait.php
elseif ($locale == 'de')
{
return [
'N', 'NNO', 'NO', 'ONO',
'O', 'OSO', 'SO', 'SSO',
'S', 'SSW', 'SW', 'WSW',
'W', 'WNW', 'NW', 'NNW',
'N'
];
}
In v2 I added the german translation. Regarding the wind arrow. I think that would be best to address in the template instead of the add on
In
ConversionTrait.php
In
CurrentWeather.php
add$current['wind_icon']=$this->makeWindIconFromDeg($current['wind_deg'],$locale);
And in
Forecast.php
$item['wind_icon']=$this->makeWindIconFromDeg($item['wind_deg'],$locale);
Now you can create an icon showing the wind direction in antlers like so
{{wind_icon}}
Note: this requires fontawesome (v6) to work, since the icon is derived from there