function locale_install

Implements hook_install().

File

drupal/core/modules/locale/locale.install, line 13
Install, update, and uninstall functions for the Locale module.

Code

function locale_install() {

  // Create the interface translations directory and ensure it's writable.
  if (!($directory = config('locale.settings')
    ->get('translation.path'))) {
    $directory = conf_path() . '/files/translations';
    config('locale.settings')
      ->set('translation.path', $directory)
      ->save();
  }
  file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
}