Adds the currently selected language to the Accept-Language header
Purpose
Adds the current language to the Accept-Language header so that the backend can identify the language for translation purposes (ex. return error messages in the user's language)
Pull in the changes to your local copy of this branch and run it alongside the jgg-translated-backend-error-msgs branch of the dj_starter_demo repo. (make sure you set up the branch correctly by following the testing steps in the associated PR)
Create another user and change the language to Spanish
Try to change the new user's email to the email of the original admin user. You should get a translated error message under the text input box (refer to the screenshot below).
Changes
Purpose
Adds the current language to the Accept-Language header so that the backend can identify the language for translation purposes (ex. return error messages in the user's language)
Learning
(MDN) Accept-Language
Testing Steps
Screenshots