Index: /ZopeOCRFulltextSearch.py
===================================================================
--- /ZopeOCRFulltextSearch.py	(revision 1877)
+++ /ZopeOCRFulltextSearch.py	(revision 1885)
@@ -16,4 +16,5 @@
 import time
 import Ft
+import types
 
 TEXTERPATH="http://nausikaa2.mpiwg-berlin.mpg.de/digitallibrary/servlet/Texter?" # Url of the text servlet
@@ -77,4 +78,5 @@
             
         doc = amara.parse(resultXML.encode('utf-8'))
+        logging.debug(doc.xml())
         resultsList = doc.searchresult.results
         #logging.error("XXX:"+repr(resultsList))
@@ -124,5 +126,5 @@
         logging.debug(serverUrl)
         pr=xmlrpclib.ServerProxy(serverUrl)
-       
+
         return pr
     
@@ -247,5 +249,5 @@
           
     
-    def searchShortThread(self,string,exactSearch="no",nopages=False,SESSION=None,showpages='',mdstring=""): 
+    def searchShortThread(self,string,exactSearch="no",nopages=False,SESSION=None,showpages='',mdstring="",languages=[]): 
         """search for the string, a thread is started on the server, requests not for a full xml-file but for 
         a short form, where the results are transmitted as a text file (i.e. string representation of java hashmap)
@@ -261,4 +263,7 @@
         
         #only letters are allowed
+        if type(languages) is not types.ListType:
+            languages=[languages]
+            
         if (not (showpages == '')) and  SESSION and SESSION.has_key("sresult"):
                 ret = SESSION["sresult"]
@@ -291,7 +296,8 @@
                     logging.debug(self.searchMethod)
                     if mdstring=="":
-                        ticket=  getattr(pr,searchMethod).searchShortThreaded(string,self.indexName)
+                        ticket=  getattr(pr,searchMethod).searchShortThreaded(string,self.indexName,languages)
                     else:
-                        ticket=  getattr(pr,searchMethod).searchShortMDThreaded(string,mdstring,self.indexName)
+                        logging.debug("langs:"+repr(languages))
+                        ticket=  getattr(pr,searchMethod).searchShortMDThreaded(string,mdstring,self.indexName,languages)
                 #logging.debug(resultXML)
         
@@ -299,5 +305,5 @@
         return False,ticket,"",""
     
-    def getSearchShortThread(self,ticket,SESSION=None,nopages=False,showpages=''):
+    def getSearchShortThread(self,ticket,SESSION=None,nopages=False,showpages='',languages=[]):
         """
         @param nopages: if true page numbers are not displayed
@@ -337,4 +343,15 @@
         return True,ret,numberOfPages,dcMD
         
+    def getSupportedLanguages(self):
+        pr = self.getServerProxy();
+      
+        socket.setdefaulttimeout(30)
+        searchMethod=getattr(self,"searchMethod","OCRFulltextSearchXML")
+        
+        res=  getattr(pr,searchMethod).getSupportedLanguages()
+        
+        logging.debug("languages:"+repr(res))
+        return res
+    
     def searchShort(self,string,exactSearch="no",nopages=False,SESSION=None,showpages=''):
         
