function locale_update_8500

Update default server pattern value to use https.

File

core/modules/locale/locale.install, line 323

Code

function locale_update_8500() {
    $update_url = \Drupal::config('locale.settings')->get('translation.default_server_pattern');
    if ($update_url == 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po') {
        \Drupal::configFactory()->getEditable('locale.settings')
            ->set('translation.default_server_pattern', 'https://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po')
            ->save();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.