Index: src/wp-includes/l10n.php
===================================================================
--- src/wp-includes/l10n.php	(revision 32509)
+++ src/wp-includes/l10n.php	(working copy)
@@ -867,8 +867,9 @@
  *     @type string  $selected                     Language which should be selected. Default empty.
  *     @type bool    $show_available_translations  Whether to show available translations. Default true.
  * }
+ * @param bool $echo Whether to echo or just return the string. Defaults to true (echo).
  */
-function wp_dropdown_languages( $args = array() ) {
+function wp_dropdown_languages( $args = array(), $echo = TRUE ) {
 
 	$args = wp_parse_args( $args, array(
 		'id'           => '',
@@ -912,8 +913,6 @@
 
 	$translations_available = ( ! empty( $translations ) && $args['show_available_translations'] );
 
-	printf( '<select name="%s" id="%s">', esc_attr( $args['name'] ), esc_attr( $args['id'] ) );
-
 	// Holds the HTML markup.
 	$structure = array();
 
@@ -949,8 +948,15 @@
 		}
 		$structure[] = '</optgroup>';
 	}
+	if ( $echo ) {
+		printf( '<select name="%s" id="%s">', esc_attr( $args['name'] ), esc_attr( $args['id'] ) );
+		echo join( "\n", $structure );
+		echo '</select>';
+	} else {
+		$markup = sprintf( '<select name="%s" id="%s">', esc_attr( $args['name'] ), esc_attr( $args['id'] ) );
+		$markup .= join( "\n", $structure );
+		$markup .= '</select>';
+		return $markup;
+	}
 
-	echo join( "\n", $structure );
-
-	echo '</select>';
 }
