NC 15.0.7 weather app

Is there a possibility to convert the weather app completely to german?
green marked text is already in german,
red marked text still in english, so I have a bilingual displayed GUI
see attached pic.

thanks for any help.

There is an issue

Hello amarillo,
I have already seen this, but that is not correct, because the translation files in “\ l10n” are only for the menu.
The actual translation of the weather data is based on the URL retrieval
example:
http://api.openweathermap.org/data/2.5/forecast/daily?id=524901&lang=zh_cn

only this is URL in the programming of the weather app assembled and not as a string used thus the supplement with &lang=de does not.

anyone else has an idea for me

The issues faces, that clouds and wind are not translated
Translation of clouds can be achieved by extend the request with lang
Translation of winds is a result (of the weather app) from the degree from openweathermap-API

I’ve added some information about the possible weather conditions to the mentioned issue. Maybe a translation can be provided to it. Additionally there would be a requirement for the different wind directions, but there are only a limited number of options possible.

@Alexander.Amend Unfortunately your API link can only be seen by people having a valid key. It might be worse to use a screenshot instead of the url :wink:

This is an Exsample URL from openweathermap not my own.

and you are right, I also found the weather-conditions page,
I suspect it would be sufficient to query \lib\Controller\WeatherController.php
and change the URL to …&lang=de or other translation

private static $apiWeatherURL = "http://api.openweathermap.org/data/2.5/weather?mode=json&q=";
private static $apiForecastURL = "http://api.openweathermap.org/data/2.5/forecast?mode=json&q=";

I changeed to above, but this is not working, maybe I have a wrong way of thinking here,
I also have to say that I have no idea of programming.

private static $apiWeatherURL = "http://api.openweathermap.org/data/2.5/weather?mode=json&q=&lang=de";
private static $apiForecastURL = "http://api.openweathermap.org/data/2.5/forecast?mode=json&q=lang=de";

@Alexander.Amend I don’t think that you can do anything here. It need to be done by the app developer. Hopefully a new developer will be found in the future:

With the support of a very friendly person who does not want to be mentioned at this point because it is a work around.
Here the current approach to change the display to the desired language.
The changes refer to changing to German for other languages accordingly

Please NOTE all changes will be destroyed after update, and must be set again after update

in the file WeatherController.php
located in apps\weather\lib\Controller
change line 60 as below
$reqContent =$this->curlGET(WeatherController::$apiWeatherURL.$name."&APPID=".$apiKey."&units=".$this->metric."&lang=de");

change line 68 as below
$forecast =json_decode(file_get_contents(WeatherController::$apiForecastURL.$name."&APPID=".$apiKey."&units=".$this->metric."&lang=de"), true);

line 94, 97, 100, 103, 106, 109, 115 change as follows
return “Norden”;
return “Nord-Ost”;
return “Osten”;
return “Süd-Ost”;
return “Süden”;
return “Süd-West”;
return “Westen”;
return “Nord-West”;

To change the wind direction on the left side to the desired language

The following file must be changed app.js
located in apps\weather\js\

line 166, 169, 172, 175, 178, 181, 184, 187 change as follows
$scope.currentCity.wind.desc = “Norden”;
$scope.currentCity.wind.desc = “Nord-Ost”;
$scope.currentCity.wind.desc = “Osten”;
r$scope.currentCity.wind.desc = “Süd-Ost”;
$scope.currentCity.wind.desc = “Süden”;
r$scope.currentCity.wind.desc = “Süd-West”;
$scope.currentCity.wind.desc = “Westen”;
$scope.currentCity.wind.desc = “Nord-West”;

Fixed with these two PRs:

https://github.com/nextcloud/weather/pull/73

1 Like