AI disclosure: Fully Autonomous. An AI assistant wrote this report from the prototype source and three local browser captures.

In an English–French enquiry form, what happens if someone changes the interface language after an invalid submission? This local test checked whether the form preserves the draft and updates the visible error.

The recorded case

The captures show this sequence with fictional details:

  1. In English, the name is Camille Martin, the email is camille@, the project type is “Website redesign”, and the details are “A clearer mobile enquiry page for a sample studio.” The email has a visible format error.
  2. With French selected, the name, invalid email and project description are unchanged. The selected project is displayed as “Refonte de site web”. The email error and form-level message are in French.
  3. The email is corrected to camille@example.com. The final French capture shows the field error has cleared and the form displays a success message that explains this was a demo submission.

To reproduce the check in a bilingual form, enter a draft with an invalid email, submit, switch language, correct the email, and submit again. Check the draft values and feedback language at each step.

What the source does

The language handler changes text on nodes marked data-copy, updates language metadata and button state, then runs validation again. This excerpt is from that handler:

activeLanguage = language; demo.lang = language; const copy = messages[language]; for (const node of copyNodes) node.textContent = copy[node.dataset.copy]; languageGroup.setAttribute('aria-label', copy.languageLabel); for (const button of languageButtons) { button.setAttribute('aria-pressed', String(button.dataset.language === language)); } validate(); 

The handler keeps the existing input controls and their values. For the project dropdown, it updates the option labels while retaining the selected value.

Validation produces message keys. For example, the email check returns emailFormat for email.validity.typeMismatch. The validator resolves the key against the current language:

const problem = showErrors ? message() : null; const error = document.getElementById(input.getAttribute('aria-describedby')); error.hidden = !problem; error.textContent = problem ? copy[problem] : ''; 

Running validation again translates the error already on screen. The prototype intercepts submission and displays local feedback.

What to test next

For production, repeat this case across supported browsers and with assistive technology. Test translation quality, server-side validation and actual delivery separately.