Affects Version/s: 7.1.X, Master
Form title, language flag and validation error messages appear in wrong language when providing language via URL prefix
Steps to reproduce:
1. Set up a vanilla DXP 7.1 SP1, and set locale.prepend.friendly.url.style=2 in portal-ext. (in order to be able to use localized form URLs for the different language versions of a form)
2. Start it up and go to Control Panel/Configuration/Instance Settings/Miscellaneous and set default language to German.
3. Go to the Content/Forms section of the default site and start adding a form. Fill in its title in German (das form), and add a field to it, giving it a label in German (das field).
4. Publish the form and start adding a French translation, by filling the title in French (le form), and the field label in french (le field). Publish.
5. In a different browser tab, access the German URL for the form: e.g. http://localhost:8080/de/web/forms/shared/-/form/33849
Checkpoint: You can see that everything on the page is in German, you see the German locale flag, and if you click on Senden (without having had filled in the field), you get the validation message in German. So this look OK.
See first screenshot attached.
6. Now access the French URL for the form: http://localhost:8080/fr/web/forms/shared/-/form/33849
You still see the German locale flag and the German form title (das form), while the rest (the field part) is in French. If you click the Valider button (without having had filled in the field), you get the validation message in German. (see second screenshot)
You should see the French locale flag and the French form title (le form), so everything should be in French. If you click the Valider button (without having had filled in the field), you should get the validation message in French.