diff --git a/src/main/antlr/cosmas/c2ps_opPROX.g b/src/main/antlr/cosmas/c2ps_opPROX.g
index 1569d1a..73ee879 100644
--- a/src/main/antlr/cosmas/c2ps_opPROX.g
+++ b/src/main/antlr/cosmas/c2ps_opPROX.g
@@ -37,9 +37,16 @@
 // trying to catch everything (at the end of the option sequence) that should not appear inside the prox. options:
 // e.g. /w5umin -> remain = 'umin'.
 
-PROX_REMAIN
-	: (',')? ('b'..'h'|'j'..'l'|'n'|'o'|'q'|'r'|'u'|'v'|'y'|'z'|'B'..'H'|'J'..'L'|'N'|'O'|'Q'|'R'|'U'|'V'|'Y'|'Z') (~ ' ')* ;
+//PROX_REMAIN
+//	: (',')? ('b'..'h'|'j'..'l'|'n'|'o'|'q'|'r'|'u'|'v'|'y'|'z'|'B'..'H'|'J'..'L'|'N'|'O'|'Q'|'R'|'U'|'V'|'Y'|'Z') (~ ' ')* ;
 
+//PROX_REMAIN
+//	: (',')? ~('a'|'i'|'m'|'p'|'s'|'t'|'w'|'x'|'A'|'I'|'M'|'P'|'S'|'T'|'W'|'X'|' ')  (~ (' '))*;
+
+PROX_REMAIN
+	: ','  ~('a'|'i'|'m'|'p'|'s'|'t'|'w'|'x'|'A'|'I'|'M'|'P'|'S'|'T'|'W'|'X'|'0'..'9')  (~ ' ')* 
+ 	| ~('a'|'i'|'m'|'p'|'s'|'t'|'w'|'x'|'A'|'I'|'M'|'P'|'S'|'T'|'W'|'X'|'0'..'9')  (~ ' ')*;
+	
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 //
 // 						PROX-Parser
diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java b/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
index 6229719..06ef8ed 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
@@ -15,12 +15,97 @@
 public class c2ps_opPROX 
 
 {
-	final static boolean bDebug = false;
+	final static boolean 
+		bDebug = false;
+	
+	public static final int MLANG_ENGLISH = 0;
+	public static final int MLANG_GERMAN  = 1;
+	
+	public static int
+		messLang = MLANG_ENGLISH; // default.
 	
 	// type of an Error CommonToken:
-	final static int typeERROR = 1; 
+	final static int 
+		typeERROR = 1; 
+	
 	// Prox error codes defined in StatusCodes.java.
 	
+	private static String getErrMessEN(int errCode, String text)
+	
+	{
+	switch( errCode )
+		{
+	case StatusCodes.ERR_PROX_MEAS_NULL:
+		return String.format("Proximity operator at '%s': one of the following prox. types is missing: w,s,p!", text);
+
+	case StatusCodes.ERR_PROX_MEAS_TOOGREAT:
+		return String.format("Proximity operator at '%s': Please, specify only 1 of the following prox. types: w,s,p! " +
+							 "It is possible to specify several at once by separating them with a ','. E.g.: ' /+w2,s2,p0 '.", text);
+		
+	case StatusCodes.ERR_PROX_VAL_NULL:
+		return String.format("Proximity operator at '%s': please specify a numerical value for the distance. E.g. ' /+w5 '.", text);
+		
+	case StatusCodes.ERR_PROX_VAL_TOOGREAT:
+		return String.format("Proximity operator at '%s': please specify only 1 distance value. E.g. ' /+w5 '.", text);
+		
+	case StatusCodes.ERR_PROX_DIR_TOOGREAT:
+		return String.format("Proximity operator at '%s': please specify either '+' or '-' or none of them for the direction.", text);
+		
+	case StatusCodes.ERR_PROX_WRONG_CHARS:
+		return String.format("Proximity operator at '%s': unknown proximity options!", text);
+		
+	default:
+		return String.format("Proximity operator at '%s': unknown error. The correct syntax looks like this: E.g. ' /+w2 ' or ' /w10,s0 '.", text);
+		}	
+	}
+	
+	private static String getErrMessGE(int errCode, String text)
+
+	{
+	switch( errCode )
+		{
+	case StatusCodes.ERR_PROX_MEAS_NULL:
+		return String.format("Abstandsoperator an der Stelle '%s': es fehlt eine der folgenden Angaben: w,s,p!", text);
+		
+	case StatusCodes.ERR_PROX_MEAS_TOOGREAT:
+		return String.format("Abstandsoperator an der Stelle '%s': Bitte nur 1 der folgenden Angaben einsetzen: w,s,p! " +
+							 "Falls Mehrfachangabe erwünscht, müssen diese durch Kommata getrennt werden (z.B.: ' /+w2,s2,p0 ').", text);
+		
+	case StatusCodes.ERR_PROX_VAL_NULL:
+		return String.format("Abstandsoperator an der Stelle '%s': Bitte einen numerischen Wert einsetzen (z.B. ' /+w5 ')! ", text);
+		
+	case StatusCodes.ERR_PROX_VAL_TOOGREAT:
+		return String.format("Abstandsoperator an der Stelle '%s': Bitte nur 1 numerischen Wert einsetzen (z.B. ' /+w5 ')! ", text);
+		
+	case StatusCodes.ERR_PROX_DIR_TOOGREAT:
+		return String.format("Abstandsoperator an der Stelle '%s': Bitte nur 1 Angabe '+' oder '-' oder keine! ", text);
+		
+	case StatusCodes.ERR_PROX_WRONG_CHARS:
+		return String.format("Abstandsoperator an der Stelle '%s': unbekannte Abstandsoption(en)!", text);
+		
+	default:
+		return String.format("Abstandsoperator an der Stelle '%s': unbekannter Fehler. Korrekte Syntax z.B.: ' /+w2 ' oder ' /w10,s0 '.", text);
+		}
+	}
+	
+	private static String getErrMess(int errCode, int messLang, String text)
+	
+	{
+	if( messLang == c2ps_opPROX.MLANG_GERMAN )
+		return getErrMessGE(errCode, text);
+	else
+		return getErrMessEN(errCode, text);	
+	}
+
+	/**
+	 * buildErrorTree(): 
+	 * @param text = part of the query that contains an error.
+	 * @param errCode
+	 * @param typeDIST
+	 * @param pos
+	 * @return
+	 */
+	
 	private static CommonTree buildErrorTree(String text, int errCode, int typeDIST, int pos) 
 	
 	{
@@ -37,38 +122,8 @@
 	String
 		mess;
 	
-	switch( errCode )
-		{
-	case StatusCodes.ERR_PROX_MEAS_NULL:
-		mess      = String.format("Abstandsoperator an der Stelle '%s' es fehlt eine der folgenden Angaben: w,s,p!", text);
-		errorMes  = new CommonTree(new CommonToken(typeERROR, mess));
-		break;
-	case StatusCodes.ERR_PROX_MEAS_TOOGREAT:
-		mess      = String.format("Abstandsoperator an der Stelle '%s': Bitte nur 1 der folgenden Angaben einsetzen: w,s,p! " +
-							 "Falls Mehrfachangabe erwünscht, müssen diese durch Kommata getrennt werden (z.B.: /+w2,s0).", text);
-		errorMes  = new CommonTree(new CommonToken(typeERROR, mess));
-		break;
-	case StatusCodes.ERR_PROX_VAL_NULL:
-		mess      = String.format("Abstandsoperator an der Stelle '%s': Bitte einen numerischen Wert einsetzen (z.B. /+w5)! ", text);
-		errorMes  = new CommonTree(new CommonToken(typeERROR, mess));
-		break;
-	case StatusCodes.ERR_PROX_VAL_TOOGREAT:
-		mess      = String.format("Abstandsoperator an der Stelle '%s': Bitte nur 1 numerischen Wert einsetzen (z.B. /+w5)! ", text);
-		errorMes  = new CommonTree(new CommonToken(typeERROR, mess));
-		break;
-	case StatusCodes.ERR_PROX_DIR_TOOGREAT:
-		mess      = String.format("Abstandsoperator an der Stelle '%s': Bitte nur 1 Angabe '+' oder '-' oder keine! ", text);
-		errorMes  = new CommonTree(new CommonToken(typeERROR, mess));
-		break;
-	case StatusCodes.ERR_PROX_WRONG_CHARS:
-		mess      = String.format("Abstandsoperator an der Stelle '%s': unbekannte Abstandsoption(en)!", text);
-		errorMes  = new CommonTree(new CommonToken(typeERROR, mess));
-		break;
-	default:
-		mess = String.format("Abstandsoperator an der Stelle '%s': unbekannter Fehler. Korrekte Syntax z.B.: /+w2 oder /w10,s0.", text);
-
-		errorMes  = new CommonTree(new CommonToken(typeERROR, mess));
-		}
+	mess 	 = getErrMess(errCode, messLang, text);
+	errorMes = new CommonTree(new CommonToken(typeERROR, mess));
 	
 	errorTree.addChild(errorNode);
 	errorNode.addChild(errorPos);
