-
Notifications
You must be signed in to change notification settings - Fork 550
Description
Here the following is written:
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":
function getForecastFromNetwork(coords) {
return fetch(`/forecast/${coords}?lang=ru&units=auto`)
.then(response => {
return response.json();
})
.catch(() => {
return null;
});
}
Errors appeared in app.js:
Error in index.html:
The attribute name of [viewBox] must be in a lowercase.
<div id="weather-template" class="weather-card" hidden>
<div class="card-spinner">
HERE>> <svg viewBox="0 0 32 32" width="32" height="32"> <<HERE
<circle cx="16" cy="16" r="14" fill="none"></circle>
</svg>
</div>
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.