Fixes: None;
Extra: 1) Add CustomLocaleMiddleware to middleware stack in base settings; 2) Add missing import for LocaleMiddleware and translation module; 3) Refactor locale handling by extending LocaleMiddleware.
Fixes: 1) Remove unused `GrapheneLocaleMiddleware` and `CustomLocaleCommonMiddleware` from middleware stack; 2) Remove unused `get_language_from_header` import and related translation logic;
Extra: 1) Clean up settings and middleware files by removing redundant locale handling logic; 2) Minor formatting adjustments for consistency.
Replaced hardcoded host checks with a dynamic check using `ALLOWED_HOSTS` from environment variables. Adjusted exception logging to include tracebacks only when the `DEBUG` environment variable is enabled.