You are here

function admin_language_node_presave in Administration Language 7

Implements hook_node_presave().

File

./admin_language.module, line 146
Makes admin pages be displayed in the administrator's preferred language.

Code

function admin_language_node_presave($node) {
  if (!user_access('use all enabled languages')) {
    if (variable_get('admin_language_force_default', 0)) {

      // Force the use of the default site language.
      $default = language_default();
      $node->language = $default->language;
    }
  }
}