The title pretty much says it all.
I have this question:

that has this code to move the labels in front of the boxes:
Qualtrics.SurveyEngine.addOnReady(function() {
// Move the "Today" label in front of the first text field
const todayLabel = document.createElement('span');
todayLabel.innerHTML = "Today: ";
todayLabel.style.marginRight = "10px"; // Add spacing
const todayField = document.querySelector('input[type="text"]');
todayField.parentNode.insertBefore(todayLabel, todayField);
// Move the "2030" label in front of the second text field
const year2030Label = document.createElement('span');
year2030Label.innerHTML = "2030: ";
year2030Label.style.marginRight = "10px"; // Add spacing
const year2030Field = document.querySelectorAll('input[type="text"]')[1];
year2030Field.parentNode.insertBefore(year2030Label, year2030Field);
});
The issue is that the label isn’t dynamic, so it doesn’t adjust to the chosen language. I have 14 languages and no matter what I try, I just cannot get this label to change. I have tried a label-changing code I found here and tried embedding it within the above code, but it either does nothing or returns “false” for all languages. I spent two hours last night arguing with ai about this code and none of its suggestions work. I just asked ai for a unique code that does all that I need it to, and now I have no labels at all.
Can someone please help me? I am completely stuck here.