Multilingual website always shows English content on the contact form custom success page

I have a problem with my multilingual website to show the correct language on the contact form success page (custom).

My website

  • uses a CNAME for a custom domain (upon private request)
  • is available in 3 different languages (which are located in directories)
  • uses Netlify language redirection (netlify.toml)
  • makes use of Netlify forms for the contact form
  • makes use of a Netlify function to clean up contact requests after sending

Language redirects:

  from = "/"
  to = "/de-de/"
  status = 302
  force = true
  conditions = {Language = ["de"]}

  from = "/"
  to = "/en-us/"
  status = 302
  force = true
  conditions = {Language = ["en"]}

  from = "/"
  to = "/es-es/"
  status = 302
  force = true
  conditions = {Language = ["es"]}

Forms and behavior

<form action='/en-us/contact/success' ...:

/en-us/contact/ (form page in English) after sending:
/en-us/contact/sent (thank you page in English)

<form action='/de-de/kontakt/gesendet' ...:

/de-de/kontakt/ (form page in German) after sending:
/de-de/kontakt/gesendet (thank you page in English)

<form action='/es-es/contacto/enviado' ...:

/es-es/contacto/ (form page in Spanish) after sending:
/es-es/contacto/enviado (thank you page in English)

Further problem description

  • In all cases, the success page URL is correct but the language is always English.
  • Only after clicking F5 (refresh) on the success page, the correct language version is displayed.
  • The error also occurs in incognito mode/private browsing (different browsers), tested with the 3 different browser languages.

Something is fishy here and whatever is causing the error seems to happen on Netlify’s side.

Can somebody look into this?
Thank you for your help in advance.

Hey there, @dafoobar :wave:

Thanks so much for reaching out and writing such a detailed and thorough post. We appreciate it!

I do not see any initial problems with your redirects set up based on what you have shared. Can you please share your site URL so that we can look into this further?

Hey @dafoobar,

You seem to have set the same name for all 3 forms. Could you try to change the form name?

1 Like

@ hrishikesh

Shipping the form in each language with a different name, solved the problem. Would you mind explaining why this is needed? Thank you for your support.

Glad to hear forms are working for you now @dafoobar ! :tada:

Form names need to be unique on your site. You can reuse it on other sites. This is just one of the requirements for Netlify forms, please check out our forms support guide to learn more.