Index: /trunk/zoo-project/zoo-kernel/service_internal.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 375)
+++ /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 376)
@@ -59,5 +59,5 @@
 #include <openssl/buffer.h>
 
-//#include "cgic.h"
+#include "cgic.h"
 #include "ulinet.h"
 
Index: /trunk/zoo-project/zoo-kernel/service_internal_python.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 375)
+++ /trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 376)
@@ -28,4 +28,5 @@
 
 PyMethodDef zooMethods[] = {
+  {"_", PythonTranslate, METH_VARARGS, "Translate a string using the zoo-services textdomain."},
   {"update_status", PythonUpdateStatus, METH_VARARGS, "Update status percentage of a running process."},
   {NULL, NULL, 0, NULL} /* tempt not the blade, all fear the sentinel */
@@ -418,4 +419,17 @@
 
 PyObject*
+PythonTranslate(PyObject* self, PyObject* args)
+{
+  char *str;
+  if (!PyArg_ParseTuple(args, "s", &str)){
+#ifdef DEBUG
+    fprintf(stderr,"Incorrect arguments to update status function");
+#endif
+    return NULL;
+  }
+  return PyString_FromString(_ss(str));
+}
+
+PyObject*
 PythonUpdateStatus(PyObject* self, PyObject* args)
 {
Index: /trunk/zoo-project/zoo-kernel/service_internal_python.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_python.h	(revision 375)
+++ /trunk/zoo-project/zoo-kernel/service_internal_python.h	(revision 376)
@@ -45,4 +45,5 @@
 int zoo_python_support(maps**,map*,service*,maps**,maps**);
 
+PyObject* PythonTranslate(PyObject*, PyObject*);
 PyObject* PythonUpdateStatus(PyObject*, PyObject*);
 
Index: /trunk/zoo-project/zoo-kernel/zoo_loader.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/zoo_loader.c	(revision 375)
+++ /trunk/zoo-project/zoo-kernel/zoo_loader.c	(revision 376)
@@ -78,4 +78,5 @@
   fprintf (stderr, "RequestMethod: (%s) %d %d\n", cgiRequestMethod,strncasecmp(cgiRequestMethod,"post",4),strncmp(cgiContentType,"text/xml",8)==0 || strncasecmp(cgiRequestMethod,"post",4)==0); 
   fprintf (stderr, "Request: %s\n", cgiQueryString);
+  fflush(stderr);
 #endif
 
@@ -85,5 +86,4 @@
   if(strncmp(cgiContentType,"text/xml",8)==0 || 
      strncasecmp(cgiRequestMethod,"post",4)==0){
-    //fprintf(stderr,"length %d\n",cgiContentLength);
     if(cgiContentLength==NULL){
        cgiContentLength=0;
@@ -104,8 +104,10 @@
 	 }
        }
-       if(res==NULL){
+       if(res==NULL && (strQuery==NULL || strlen(strQuery)==0)){
 	 return errorException(NULL,"ZOO-Kernel failed to process your request cause the request was emtpty.","InternalError");
-       }else
-	 tmpMap=createMap("request",res);
+       }else{
+	 if(strQuery==NULL || strlen(strQuery)==0)
+	   tmpMap=createMap("request",res);
+       }
     }else{
       char *buffer=new char[cgiContentLength+1];
@@ -113,5 +115,4 @@
 	buffer[cgiContentLength]=0;
 	tmpMap=createMap("request",buffer);
-	//fprintf(stderr,"%s\n",tmpMap->value);
       }else{
 	buffer[0]=0;
@@ -133,6 +134,4 @@
 	    free(tmp);
 	  }
-	  
-	  sprintf(tmpValueFinal,"%s=%s",*arrayStep,ivalue);
 	  free(tmpValueFinal);
 #ifdef DEBUG
@@ -321,11 +320,10 @@
   }
 
-
   if(strncasecmp(cgiContentType,"multipart/form-data",19)==0){
-      map* tmp=getMap(tmpMap,"dataInputs");
-      if(tmp!=NULL){
-	addToMap(tmpMap,"dataInputs",strstr(strQuery,"dataInputs=")+11);
-      }
-    }
+    map* tmp=getMap(tmpMap,"dataInputs");
+    if(tmp!=NULL){
+      addToMap(tmpMap,"dataInputs",strstr(strQuery,"dataInputs=")+11);
+    }
+  }
 
   runRequest(tmpMap);
Index: /trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 375)
+++ /trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 376)
@@ -28,4 +28,6 @@
 extern "C" int crlex();
 
+#include "cgic.h"
+
 extern "C" {
 #include <libxml/tree.h>
@@ -36,5 +38,4 @@
 }
 
-#include "cgic.h"
 #include "ulinet.h"
 
@@ -108,4 +109,5 @@
 
 #define _(String) dgettext ("zoo-kernel",String)
+#define __(String) dgettext ("zoo-service",String)
 
 
@@ -541,6 +543,12 @@
 #endif
 
-  bindtextdomain ("zoo-kernel","/usr/share/locale/");
-  bindtextdomain ("zoo-services","/usr/share/locale/");
+  map *getPath=getMapFromMaps(m,"main","gettextPath");
+  if(getPath!=NULL){
+    bindtextdomain ("zoo-kernel",getPath->value);
+    bindtextdomain ("zoo-services",getPath->value);    
+  }else{
+    bindtextdomain ("zoo-kernel","/usr/share/locale/");
+    bindtextdomain ("zoo-services","/usr/share/locale/");
+  }
 
   /**
@@ -554,13 +562,26 @@
 	fstde = freopen(fstdem->value, "a+", stderr) ;
 
-  if((r_inputs=getMap(request_inputs,"language"))!=NULL){
+  r_inputs=getMap(request_inputs,"language");
+  if(r_inputs==NULL)
+    r_inputs=getMapFromMaps(m,"main","language");
+  if(r_inputs!=NULL){
     char *tmp=strdup(r_inputs->value);
+    setMapInMaps(m,"main","language",tmp);
     translateChar(tmp,'-','_');
     setlocale (LC_ALL, tmp);
+#ifdef WIN32
+    char tmp1[12];
+    sprintf(tmp1,"LC_ALL=%s",tmp);
+    putenv(tmp1);
+#endif
     free(tmp);
-    setMapInMaps(m,"main","language",r_inputs->value);
   }
   else{
     setlocale (LC_ALL, "en_US");
+#ifdef WIN32
+    char tmp1[12];
+    sprintf(tmp1,"LC_ALL=en_US");
+    putenv(tmp1);
+#endif
     setMapInMaps(m,"main","language","en-US");
   }
