admin_language_t_function_override
Forces a specific interface language layout (e.g., English or a custom user-defined preference) on designated administrative paths and node translation edit forms, while leaving underlying content dataset values entirely untouched.
Overview
Managing multilingual environments in Drupal often poses a distinct workflow issue for content editors and administrators. When working on a localized node edit path (such as /fr-ca/node/123/edit), Drupal's core routing architecture naturally translates the entire administrative interface layout, including the primary toolbar, sidebar settings blocks, buttons, and summary wrappers, into that translation's language.
The Admin Language t() function Override module resolves this by decorating Drupal's low-level string translation manager (string_translation). By targeting string rendering operations directly instead of disrupting routing stacks or the global language environment state, this extension enforces your desired translation language layout strictly on specified admin tools. Most importantly, it completely preserves the true content language context, ensuring your multilingual field datasets load, display, and save in their correct language.
Key Features
- Safe Architecture Isolation: Decorates the string translation engine directly instead of the global Language Manager service. This keeps your configuration fields, paragraphs, and translation forms safe from accidental data conversion side effects.
- Individual Account Preferences: Automatically appends an "Administration Language Preference" selection card onto user profile editing views (
/user/{uid}/edit). This lets individual back-end administrators choose their own custom dashboard interface translation setting. - Granular Wildcard Overrides: Configure precisely which paths undergo interface string modification using a clean wildcard management textarea (e.g.,
/*/edit,/*/delete,/admin/*). - Smart Fallback Matching: Gracefully defaults layout text to English if an active path matches your structural wildcard criteria but the user has left their profile preference set to "Use site default language."
- Clean Footprint: Zero heavy hook alterations or theme-layer requirements, keeping container bootstrap speeds exceptionally high.
Configuration & Usage
- Install and enable the extension like any standard Drupal module.
- Navigate to Configuration » Regional and language » Admin Language Override Settings (
/admin/config/regional/admin-language-t-function-override). - Turn on the master configuration switch and input your targeted layout path rules (one per line).
- (Optional) Instruct your translation team or site managers to visit their user profile configuration forms to choose an explicit interface language preference that suits their editing workflows.