Blog: June 2010

Overriding language for a Drupal backend

Someone in my DPC Drupal tutorial brought up the topic of multi-lingual sites, and asked how to run the backend of the site in English, when the frontend is in Dutch...

Text in Drupal should run through the t() function, which handles translation. t() checks the global $language variable to choose the target language ($language may be set from user preferences, from a path parameter, from will be set automatically).

The solution is to implement an early bootstrap hook - hook_init - to change the language.

Subscribe to Blog: June 2010