protected function download_language_pack( $download, $slug = null ) {
		$translations        = $this->get_all_languages( $slug );
		$translation_to_load = null;

		foreach ( $translations as $translation ) {
			if ( $translation['language'] === $download ) {
				$translation_to_load = $translation;
				break;
			}
		}

		if ( ! $translation_to_load ) {
			return new \WP_Error( 'not_found', "Language '{$download}' not available." );
		}
		$translation = (object) $translation;

		$translation->type = rtrim( $this->obj_type, 's' );

		// Make sure caching in LanguagePackUpgrader works.
		if ( ! isset( $translation->slug ) ) {
			$translation->slug = $slug;
		}

		$upgrader = 'WP_CLI\\LanguagePackUpgrader';
		$result   = Utils\get_upgrader( $upgrader )->upgrade( $translation, array( 'clear_update_cache' => false ) );

		if ( is_wp_error( $result ) ) {
			return $result;
		}

		if ( ! $result ) {
			return new \WP_Error( 'not_installed', "Could not install language '{$download}'." );
		}

		return $translation->language;
	}