I have installed the Django modeltranslation package and almost everything works fine...
The only thing that doesn't are the AJAX requests, whose JsonResponses are still coming back in the original language. I couldn't find in the docs how to fix it.
I'm using the 'django.middleware.locale.LocaleMiddleware'
middleware, so the LANGUAGE_CODE
selection should be based on data from the request (i.e. the user's browser settings). Apparently, AJAX requests are not getting the memo.
Is there a way to let the server knows the LANGUAGE_CODE incoming from an AJAX request (other than hard coding it in the URL)?