Index: wp-includes/l10n.php
===================================================================
--- wp-includes/l10n.php	(revision 4152)
+++ wp-includes/l10n.php	(working copy)
@@ -94,4 +94,91 @@
 	load_textdomain($domain, $mofile);
 }
 
-?>
\ No newline at end of file
+/**
+ *	Finds the best key match for a bunch of locales
+ *
+ *	Follows the freedesktop.org standart:
+ *	<a href="http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html">Localized values for keys</a>
+ *
+ *	@param	mixed	$keys_array	each element must be an array, whose
+ *								first (not zero) element is the locale and its second is the key value
+ *								This format is suitable to come from for preg_match_all results
+ *	@param	string	$default_value	the value to be used if a match is not found
+ *	@return	string	the most suitable localized value for the given locales
+ */
+function l10n_match_key($keys_array, $default_value) {	
+	$locale = l10n_parse_locale(get_locale(), true);
+	if (false === $locale) {
+		return $default_value;
+	}
+	$keys_dict = array();
+	foreach ($keys_array as $item) {
+		$keys_dict[strtolower($item[1])] = $item[2];
+	}
+		
+	$lcm = strtolower(l10n_locale_parts($locale, 'lcm'));
+	$lc = strtolower(l10n_locale_parts($locale, 'lc'));
+	$lm = strtolower(l10n_locale_parts($locale, 'lm'));
+	$l = strtolower(l10n_locale_parts($locale, 'l'));
+
+	if (array_key_exists($lcm, $keys_dict)) {
+		return $keys_dict[$lcm];
+	} elseif (array_key_exists($lc, $keys_dict)) {
+		return $keys_dict[$lc];
+	} elseif (array_key_exists($lm, $keys_dict)) {
+		return $keys_dict[$lm];
+	} elseif (array_key_exists($l, $keys_dict)) {
+		return $keys_dict[$l];
+	}
+	return $default_value;
+}
+
+/**
+ *	Parses a ln_CN.Encoding@Modifier string and returns hash with its parts
+ *	
+ *	@param	string	$locale	the locale string
+ *	@param	bool	$strip_encoding whether to return empty encoding part
+ *	@return	mixed	hash with following keys:
+ *						lang, country, encoding, modifier 
+ */
+function l10n_parse_locale($locale, $strip_encoding = false) {
+	$locale_re = "^([a-z]{2})(?:_([a-z]{2}))?(?:\.([a-z0-9-]+))?(?:\@([a-z0-9-]+))?$";
+	if (preg_match("|$locale_re|i", $locale, $matches)) {
+		if ($strip_encoding) {
+			$matches[3] = '';
+		}
+		return array('locale' => $matches[0], 'lang' => $matches[1], 'country' => $matches[2],
+				'encoding' => $matches[3], 'modifier' => $matches[4]);
+	} else {
+		return false;
+	}
+}
+
+/**
+ *	Extracts parts of an already parsed locale
+ *
+ *	@param	mixed	$parsed_locale locale string parsed with {@link ln10_parse_locale}
+ *	@param	string	$format	some characters are replaced with their corresponding locale parts:
+ *						'l'	-> language
+ *						'c'	-> _country
+ *						'e'	-> .encoding
+ *						'm'	-> @modofier
+ *	@return	string	the parts defined by $format, joined together in s string
+ *
+ *	@example <code>l10n_locale_parts(l10n_parse_locale('bg_BG@baba'), 'lem')</code> returns <code>bg@baba</code>
+ */
+function l10n_locale_parts($parsed_locale, $format) {
+	$result = '';
+	$format = preg_split('//', $format, -1, PREG_SPLIT_NO_EMPTY);
+	foreach ($format as $c) {
+		switch ($c) {
+			case 'l': $result .= !empty($parsed_locale['lang'])? $parsed_locale['lang'] : ''; break;
+			case 'c': $result .= !empty($parsed_locale['country'])? '_'.$parsed_locale['country'] : ''; break;
+			case 'e': $result .= !empty($parsed_locale['encoding'])? '.'.$parsed_locale['encoding'] : ''; break;
+			case 'm': $result .= !empty($parsed_locale['modifier'])? '@'.$parsed_locale['modifier'] : ''; break;
+		}
+	}
+	return $result;
+}
+
+?>
Index: wp-admin/admin-functions.php
===================================================================
--- wp-admin/admin-functions.php	(revision 4152)
+++ wp-admin/admin-functions.php	(working copy)
@@ -1682,32 +1682,47 @@
 
 function get_plugin_data($plugin_file) {
 	$plugin_data = implode('', file($plugin_file));
+
 	preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name);
+	preg_match_all("|Plugin Name\[(.+?)\]:(.*)|i", $plugin_data, $locale_names, PREG_SET_ORDER);
+	
 	preg_match("|Plugin URI:(.*)|i", $plugin_data, $plugin_uri);
+	preg_match_all("|Plugin URI\[(.+?)\]:(.*)|i", $plugin_data, $locale_uris, PREG_SET_ORDER);
+	
 	preg_match("|Description:(.*)|i", $plugin_data, $description);
+	preg_match_all("|Description\[(.+?)\]:(.*)|i", $plugin_data, $locale_descs, PREG_SET_ORDER);
+	
 	preg_match("|Author:(.*)|i", $plugin_data, $author_name);
+	preg_match_all("|Author\[(.+?)\]:(.*)|i", $plugin_data, $locale_authors, PREG_SET_ORDER);
+	
 	preg_match("|Author URI:(.*)|i", $plugin_data, $author_uri);
+	preg_match_all("|Author URI\[(.+?)\]:(.*)|i", $plugin_data, $locale_author_uris, PREG_SET_ORDER);
+
 	if (preg_match("|Version:(.*)|i", $plugin_data, $version))
 		$version = trim($version[1]);
 	else
 		$version = '';
 
-	$description = wptexturize(trim($description[1]));
 
-	$name = $plugin_name[1];
-	$name = trim($name);
+	$name = trim(l10n_match_key($locale_names, $plugin_name[1]));
+	$plugin_uri = trim(l10n_match_key($locale_uris, $plugin_uri[1]));
+	$description = trim(l10n_match_key($locale_descs, $description[1]));
+	$author = trim(l10n_match_key($locale_authors, $author_name[1]));
+	$author_uri = trim(l10n_match_key($locale_author_uris, $author_uri[1]));
+
+	
+	$description = wptexturize($description);
+
 	$plugin = $name;
-	if ('' != $plugin_uri[1] && '' != $name) {
-		$plugin = '<a href="' . trim($plugin_uri[1]) . '" title="'.__('Visit plugin homepage').'">'.$plugin.'</a>';
+	if ('' != $plugin_uri && '' != $name) {
+		$plugin = '<a href="' . $plugin_uri . '" title="'.__('Visit plugin homepage').'">'.$plugin.'</a>';
 	}
 
-	if ('' == $author_uri[1]) {
-		$author = trim($author_name[1]);
-	} else {
-		$author = '<a href="' . trim($author_uri[1]) . '" title="'.__('Visit author homepage').'">' . trim($author_name[1]) . '</a>';
+	if ('' != $author_uri) {
+		$author = '<a href="' . $author_uri . '" title="'.__('Visit author homepage').'">' . $author . '</a>';
 	}
 
-	return array ('Name' => $name, 'Title' => $plugin, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1]);
+	return array ('Name' => $name, 'Title' => $plugin, 'Description' => $description, 'Author' => $author, 'Version' => $version);
 }
 
 function get_plugins() {

