Page 1 of 1

Darksky language

Posted: Thursday 09 May 2019 17:36
by Opus
Hi,
the darksky forecast messages are available in many different languages e.g. german. This requires an added "?lang=[language]" at the end of the http-request.
Like: https://api.darksky.net/forecast/123452 ... 89?lang=de
Inside Domoticz is no inputfield for this value. I added the language on the end of location, but it's fail and block the http-request.
Please add this nice and helpfull field.

Michael

Darksky language

Posted: Thursday 09 May 2019 18:01
by Snowtiger
Looks nice but what do you win by adding a language field - there are no devices, until now, connected to Darksky that have info that should be translated - temp, humidity, baro, wind, UV, visibility and Ozone. The forecast fields are not standard available.

Please clarefy the need for a translation.

Re: Darksky language

Posted: Thursday 09 May 2019 20:42
by Opus
The need is the Forecast string. This appears on the monitor for everyone. But english is no everyones language. I translated some simple strings e.g. 'sunny'. For foreign people is it hard to understand 'Partly cloudy throughout the day.'
moni.JPG
moni.JPG (20.61 KiB) Viewed 1758 times

The translated strings from darksky are much better and easy to use. Here is the line with the string:
forecastStr.JPG
forecastStr.JPG (11.29 KiB) Viewed 1758 times
Hope you understand my wish. It makes domoticz much easier for multiple languages.

Michael

Darksky language

Posted: Friday 10 May 2019 0:49
by Snowtiger
I understand your wish, but in the standard Darksky implementation forecast is not available as device.

How do you get your information from Darksky - I believe via the Darksky weather plugin that is standard available in Domoticz?

I do not know a screen where the forecast is displayed? Or do you use a special theme or other function to display the Weather data from Darksky?

Re: Darksky language

Posted: Friday 10 May 2019 1:11
by Newbie
Opus wrote: Thursday 09 May 2019 17:36 Hi,
the darksky forecast messages are available in many different languages e.g. german. This requires an added "?lang=[language]" at the end of the http-request.
Like: https://api.darksky.net/forecast/123452 ... 89?lang=de
Inside Domoticz is no inputfield for this value. I added the language on the end of location, but it's fail and block the http-request.
Please add this nice and helpfull field.

Michael
In my knowledge domoticz already sends the country string. If in firefox i open the darksky frame in a new window, the full url is something like this:

Code: Select all

https://darksky.net/forecast/45.8572,9.8586/ca24/it
and the "it" at the end shows the page in italian.
Sincerely i have no troubles with this, unless you refer to the map language, but there i'm not aware of a lang parameter in the api

Re: Darksky language

Posted: Wednesday 15 May 2019 13:46
by Opus
Snowtiger wrote: Friday 10 May 2019 0:49 I understand your wish, but in the standard Darksky implementation forecast is not available as device.

How do you get your information from Darksky - I believe via the Darksky weather plugin that is standard available in Domoticz?

I do not know a screen where the forecast is displayed? Or do you use a special theme or other function to display the Weather data from Darksky?
Okay, I've two monitors in my house and they shows me some parameters called from Domoticz by 'http://192.168.178.122:8080/json.htm?ty ... ces&plan=8'. The returned wheater values has the string 'forecastStr' with the forecast text in english language. Yes, I use the hardwired Darksky plugin. And for this I need to set the language option, like "en, de, it, nl ....". There is no other way. It is?

Michael

Re: Darksky language

Posted: Wednesday 15 May 2019 22:54
by hestia
Perhaps you can use this script
https://www.domoticz.com/forum/viewtopi ... 57#p202657
and add the device with the text (it is easy, just by duplicate what is done on other fields)
and choose your language
Hope this help (but don't have time to do it)

Re: Darksky language

Posted: Tuesday 28 May 2019 16:41
by Opus
OMG, why should I use a script with all its disadvantages, if it were enough to send the set language to dark weather? I already set my language in the setup. Since it is only logical that this is also desired for weather reports.
A small attachment of the language feature to the string may pose a minor problem for the programmer. A great help for the users!
Where is the problem?

Re: Darksky language

Posted: Tuesday 28 May 2019 17:22
by elmortero
Opus wrote: Tuesday 28 May 2019 16:41A small attachment of the language feature to the string may pose a minor problem for the programmer. A great help for the users!
Where is the problem?
Well Opus,
Domoticz - and thus also the plugins - are open source. You could always contribute and implement it.

Wanna make the (domoticz) world a better place? Be that change.

Re: Darksky language

Posted: Tuesday 28 May 2019 17:34
by Opus
I'm a Domoticz user - not a programmer. Great help!