You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lang = [language] optional
Return summary properties in the desired language. (Note that units in the summary will be set according to the units parameter, so be sure to set both parameters appropriately.)
units = [units] optional
Return weather conditions in the requested units. [units] should be one of the following:
auto: automatically select units based on geographic location
I added in app.js to the getForecastFromNetwork function "?Lang=ru&units=auto":
Found.
It is also necessary to add the same fragment "?Lang=ru&units=auto" in function getForecast() to server.js.
Unfortunately, in the index.html file, the units are static. Therefore, instead of "°F" you can write "°F/°C".
But it is better to analyze “timezone” in the answer and if “America/New_York”, then substitute “°F”, otherwise set “°C”.
Here the following is written:
I added in app.js to the getForecastFromNetwork function "?Lang=ru&units=auto":
Errors appeared in app.js:
Error in index.html:
General view: still Fahrenheit and miles/hour instead of Celsius and meters/second.
I would be grateful for a hint on how to change the code so that the language and units of measurement are correctly determined.
The text was updated successfully, but these errors were encountered: