Title: Language_Pack_Upgrader_Skin
Published: April 25, 2014
Last modified: February 24, 2026

---

# class Language_Pack_Upgrader_Skin {}

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#see-also)
 * [Methods](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#methods)
 * [Source](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#wp--skip-link--target)

Translation Upgrader Skin for WordPress Translation Upgrades.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#see-also)󠁿

 * [WP_Upgrader_Skin](https://developer.wordpress.org/reference/classes/wp_upgrader_skin/)

## 󠀁[Methods](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#methods)󠁿

| Name | Description | 
| [Language_Pack_Upgrader_Skin::__construct](https://developer.wordpress.org/reference/classes/language_pack_upgrader_skin/__construct/) | Constructor. | 
| [Language_Pack_Upgrader_Skin::after](https://developer.wordpress.org/reference/classes/language_pack_upgrader_skin/after/) | Performs an action following a language pack update. | 
| [Language_Pack_Upgrader_Skin::before](https://developer.wordpress.org/reference/classes/language_pack_upgrader_skin/before/) | Performs an action before a language pack update. | 
| [Language_Pack_Upgrader_Skin::bulk_footer](https://developer.wordpress.org/reference/classes/language_pack_upgrader_skin/bulk_footer/) | Displays the footer following the bulk update process. | 
| [Language_Pack_Upgrader_Skin::error](https://developer.wordpress.org/reference/classes/language_pack_upgrader_skin/error/) | Displays an error message about the update. |

## 󠀁[Source](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#source)󠁿

    ```php
    class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
    	public $language_update        = null;
    	public $done_header            = false;
    	public $done_footer            = false;
    	public $display_footer_actions = true;

    	/**
    	 * Constructor.
    	 *
    	 * Sets up the language pack upgrader skin.
    	 *
    	 * @since 3.7.0
    	 *
    	 * @param array $args
    	 */
    	public function __construct( $args = array() ) {
    		$defaults = array(
    			'url'                => '',
    			'nonce'              => '',
    			'title'              => __( 'Update Translations' ),
    			'skip_header_footer' => false,
    		);
    		$args     = wp_parse_args( $args, $defaults );
    		if ( $args['skip_header_footer'] ) {
    			$this->done_header            = true;
    			$this->done_footer            = true;
    			$this->display_footer_actions = false;
    		}
    		parent::__construct( $args );
    	}

    	/**
    	 * Performs an action before a language pack update.
    	 *
    	 * @since 3.7.0
    	 */
    	public function before() {
    		$name = $this->upgrader->get_name_for_update( $this->language_update );

    		echo '<div class="update-messages lp-show-latest">';

    		/* translators: 1: Project name (plugin, theme, or WordPress), 2: Language. */
    		printf( '<h2>' . __( 'Updating translations for %1$s (%2$s)&#8230;' ) . '</h2>', $name, $this->language_update->language );
    	}

    	/**
    	 * Displays an error message about the update.
    	 *
    	 * @since 3.7.0
    	 * @since 5.9.0 Renamed `$error` to `$errors` for PHP 8 named parameter support.
    	 *
    	 * @param string|WP_Error $errors Errors.
    	 */
    	public function error( $errors ) {
    		echo '<div class="lp-error">';
    		parent::error( $errors );
    		echo '</div>';
    	}

    	/**
    	 * Performs an action following a language pack update.
    	 *
    	 * @since 3.7.0
    	 */
    	public function after() {
    		echo '</div>';
    	}

    	/**
    	 * Displays the footer following the bulk update process.
    	 *
    	 * @since 3.7.0
    	 */
    	public function bulk_footer() {
    		$this->decrement_update_count( 'translation' );

    		$update_actions = array(
    			'updates_page' => sprintf(
    				'<a href="%s" target="_parent">%s</a>',
    				self_admin_url( 'update-core.php' ),
    				__( 'Go to WordPress Updates page' )
    			),
    		);

    		/**
    		 * Filters the list of action links available following a translations update.
    		 *
    		 * @since 3.7.0
    		 *
    		 * @param string[] $update_actions Array of translations update links.
    		 */
    		$update_actions = apply_filters( 'update_translations_complete_actions', $update_actions );

    		if ( $update_actions && $this->display_footer_actions ) {
    			$this->feedback( implode( ' | ', $update_actions ) );
    		}
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-language-pack-upgrader-skin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/class-language-pack-upgrader-skin.php#L18)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-language-pack-upgrader-skin.php#L18-L115)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Upgrader_Skin](https://developer.wordpress.org/reference/classes/wp_upgrader_skin/)`wp-admin/includes/class-wp-upgrader-skin.php` |

Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/Language_Pack_Upgrader_Skin/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Flanguage_pack_upgrader_skin%2F)
before being able to contribute a note or feedback.