WordPress at a glance
function is not described

wp_get_available_translations() WP 4.0.0

Get available translations from the WordPress.org API.

  • See: translations_api()

No Hooks.

Return

Array. Array of translations, each an array of data. If the API response results in an error, an empty array will be returned.

Usage

wp_get_available_translations();

Code of wp get available translations: wp-admin/includes/translation-install.php VER 5.1.1

<?php
function wp_get_available_translations() {
	if ( ! wp_installing() && false !== ( $translations = get_site_transient( 'available_translations' ) ) ) {
		return $translations;
	}

	include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version

	$api = translations_api( 'core', array( 'version' => $wp_version ) );

	if ( is_wp_error( $api ) || empty( $api['translations'] ) ) {
		return array();
	}

	$translations = array();
	// Key the array with the language code for now.
	foreach ( $api['translations'] as $translation ) {
		$translations[ $translation['language'] ] = $translation;
	}

	if ( ! defined( 'WP_INSTALLING' ) ) {
		set_site_transient( 'available_translations', $translations, 3 * HOUR_IN_SECONDS );
	}

	return $translations;
}