multilingual

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 content-negotiation...it will be set automatically).

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

Subscribe to RSS - multilingual