Language selector.

Signature

wp_dropdown_languages( $args = array() )
args
 (array) Optional arguments. Default empty array.
Default: array()

Return

(void)

Source

function wp_dropdown_languages( $args = array() ) {
	require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );

	$args = wp_parse_args( $args, array(
		'id'        => '',
		'name'      => '',
		'languages' => array(),
		'selected'  => ''
	) );

	if ( empty( $args['languages'] ) ) {
		return false;
	}

	$translations = wp_get_available_translations();

	/*
	 * $args['languages'] should only contain the locales. Find the locale in
	 * $translations to get the native name. Fall back to locale.
	 */
35 more lines...
WP Trac GitHub

Link here