NEW - bug 210: Babel or Babel-like Community Internationalization
https://foundation.eclipse.org/infrazilla/show_bug.cgi?id=210
diff --git a/html/callback/getCurrentStringTranslation.php b/html/callback/getCurrentStringTranslation.php
index 6ec5f1b..5e0a4db 100644
--- a/html/callback/getCurrentStringTranslation.php
+++ b/html/callback/getCurrentStringTranslation.php
@@ -16,6 +16,8 @@
 
 $string_id = $App->getHTTPParameter("string_id", "POST");
 
+$language = $_SESSION['language'];
+
 $query = "select 
 			strings.string_id,
 			strings.value as string_value,
@@ -24,7 +26,11 @@
 		  from
 		  	strings
 		  	left join translations on
-		  		(strings.string_id = translations.string_id and translations.is_active != 0)
+		  		(strings.string_id = translations.string_id 
+		  		 and 
+		  		 translations.is_active != 0 
+		  		 and 
+		  		 translations.language_id = '".addslashes($language)."')
 		  where
 		  	strings.is_active != 0
 		  and
@@ -34,6 +40,8 @@
 		  limit 1
 			";
 
+print $query;
+
 $res = mysql_query($query,$dbh);
 
 $line = mysql_fetch_array($res, MYSQL_ASSOC);