{"action":"created","issue":{"url":"https://api.github.com/repos/domoticz/domoticz/issues/2808","repository_url":"https://api.github.com/repos/domoticz/domoticz","labels_url":"https://api.github.com/repos/domoticz/domoticz/issues/2808/labels{/name}","comments_url":"https://api.github.com/repos/domoticz/domoticz/issues/2808/comments","events_url":"https://api.github.com/repos/domoticz/domoticz/issues/2808/events","html_url":"https://github.com/domoticz/domoticz/issues/2808","id":374622811,"node_id":"MDU6SXNzdWUzNzQ2MjI4MTE=","number":2808,"title":"Weather forecast now always in english","user":{"login":"TheUlpio","id":13163959,"node_id":"MDQ6VXNlcjEzMTYzOTU5","avatar_url":"https://avatars0.githubusercontent.com/u/13163959?v=4","gravatar_id":"","url":"https://api.github.com/users/TheUlpio","html_url":"https://github.com/TheUlpio","followers_url":"https://api.github.com/users/TheUlpio/followers","following_url":"https://api.github.com/users/TheUlpio/following{/other_user}","gists_url":"https://api.github.com/users/TheUlpio/gists{/gist_id}","starred_url":"https://api.github.com/users/TheUlpio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheUlpio/subscriptions","organizations_url":"https://api.github.com/users/TheUlpio/orgs","repos_url":"https://api.github.com/users/TheUlpio/repos","events_url":"https://api.github.com/users/TheUlpio/events{/privacy}","received_events_url":"https://api.github.com/users/TheUlpio/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-27T08:46:17Z","updated_at":"2018-10-29T06:53:46Z","closed_at":"2018-10-29T06:53:46Z","author_association":"NONE","body":"Sorry for my bad english...\r\n\r\nAfter the commit #2775 which solves the issue #2726, i've noticed that darksky iframe in forecast page is always set to english. i can change other options, ie units (m/s ,km/h...) and them are kept, but language returns always to english.\r\n\r\nIf i open darksky page in browser, all settings are kept, so, i can have at the same time a tab with darksky in my native language and another tab with the domoticz forecast page in english.\r\n\r\nThis happens on all my devices (PCs -> various linux distro; tablets -> android) also if i flush browser cache and delete cookies (in this case i have to set again my options).\r\n\r\nanalyzing the domoticz iframe html, it starts with:\r\n\r\n\"<!doctype html>\"\r\n\"\\<html lang=\"en\">\"\r\n\"\\<head>\"\r\n\"...\" \r\n\r\nso \"english\" is forced in code. \r\n\r\nI'm not a programmer, so i ask if it's a way to integrate in forecastcontroller.js also the lang option as set in config page."},"comment":{"url":"https://api.github.com/repos/domoticz/domoticz/issues/comments/433805489","html_url":"https://github.com/domoticz/domoticz/issues/2808#issuecomment-433805489","issue_url":"https://api.github.com/repos/domoticz/domoticz/issues/2808","id":433805489,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzgwNTQ4OQ==","user":{"login":"gizmocuz","id":2265299,"node_id":"MDQ6VXNlcjIyNjUyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/2265299?v=4","gravatar_id":"","url":"https://api.github.com/users/gizmocuz","html_url":"https://github.com/gizmocuz","followers_url":"https://api.github.com/users/gizmocuz/followers","following_url":"https://api.github.com/users/gizmocuz/following{/other_user}","gists_url":"https://api.github.com/users/gizmocuz/gists{/gist_id}","starred_url":"https://api.github.com/users/gizmocuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gizmocuz/subscriptions","organizations_url":"https://api.github.com/users/gizmocuz/orgs","repos_url":"https://api.github.com/users/gizmocuz/repos","events_url":"https://api.github.com/users/gizmocuz/events{/privacy}","received_events_url":"https://api.github.com/users/gizmocuz/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T06:53:46Z","updated_at":"2018-10-29T06:53:46Z","author_association":"CONTRIBUTOR","body":"That was easy to do... it works! The code is now:\r\n\r\n```\r\n\t\t\tvar units = \"ca24\";\r\n\t\t\tif ($rootScope.config.TempSign == \"F\") {\r\n\t\t\t    units = \"us12\";\r\n\t\t\t} else {\r\n\t\t\t    if ($rootScope.config.WindSign == \"m/s\")\r\n\t\t\t        units = \"si24\";\r\n\t\t\t    else if ($rootScope.config.WindSign == \"km/h\")\r\n\t\t\t        units = \"ca24\";\r\n\t\t\t    else if ($rootScope.config.WindSign == \"mph\")\r\n\t\t\t        units = \"uk224\";\r\n\t\t\t}\r\n\t\t\thtmlcontent += '<iframe class=\"cIFrameLarge\" id=\"IMain\" src=\"//darksky.net/forecast/' + $scope.config.Latitude + ',' + $scope.config.Longitude + '/' + units + '/' + $rootScope.config.language + '\"></iframe>';\r\n\r\n```\r\n\r\nClosing the issue"}}
{"actor":{"display_login":"gizmocuz"}}