Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent users from being able to choose their own locale/language
A user on the team, who is based in the USA, noticed that the i18n strings in the application were not being translated. We realised their browser is set up to send en-US as the locale in an Accept header, and as a result django is trying (and failing) to find an en-US locale file. This is despite the application being set up to use en-GB as the default. Additionally, other country locales do not have the same issue (e.g ca-ES) One way to attempt to resolve this is to prevent users from being able to select their language, by removing the `LocaleMiddleware`. We currently do not have any other locales to offer, and we have no current plans to add any. If/when we decide to add more locales to the application, we can look into reinstating the middleware and figuring out why en-GB is not being treated as the default when a user's locale is set to en-US https://docs.djangoproject.com/en/4.1/topics/i18n/translation/#how-django-discovers-language-preference
- Loading branch information