Replace text on map with translation
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
function updateTranslations(response) {
|
function updateTranslations(response) {
|
||||||
console.log(response)
|
const translations = JSON.parse(response);
|
||||||
|
document.querySelectorAll(".languageText").forEach(element => {
|
||||||
|
element.textContent = translations[element.id.replace("Text", "")];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user