Skip to content

Instantly share code, notes, and snippets.

@stborchert
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stborchert/9778307 to your computer and use it in GitHub Desktop.
Save stborchert/9778307 to your computer and use it in GitHub Desktop.
Force Drupal to use English as default language on admin pages.
<?php
/**
* Force Drupal to use English as default language on admin pages and for drush.
*/
if (empty($_REQUEST) || (!empty($_GET['q']) && strpos($_GET['q'], 'admin') !== FALSE)) {
$language_default = array(
'language' => 'en', 'name' => 'English', 'native' => 'English',
'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '',
'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''
);
$conf['language_default'] = (object) $language_default;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment