Author: remi
Date: 2009-06-24 11:51:30 +0200 (Wed, 24 Jun 2009)
New Revision: 4888

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* use the user configuration to set the web interface language

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
  2009-06-24 09:36:21 UTC (rev 4887)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
  2009-06-24 09:51:30 UTC (rev 4888)
@@ -3,7 +3,11 @@
 # 
==============================================================================
 
 from translation.Translation import Translation
+from util.misc.tuxPaths import TUXDROID_LANGUAGE
 
+splitedLC = TUXDROID_LANGUAGE.split("_")
+GUI_LANGUAGE = str(splitedLC[0])
+
 # 
------------------------------------------------------------------------------
 # Declaration of the resource "wi_user_01".
 # 
------------------------------------------------------------------------------
@@ -105,8 +109,9 @@
 # Register the service into the resource
 resourceWIUser01.addService(TDSServiceWIUser01Index)
 # Bind the resource index url to this service
-resourcesManager.addBinding("user", "wi_user_01", "index", 
"skin=user_01&language=en&menu=livewithtux")
-resourcesManager.addBinding("user/index", "wi_user_01", "index", 
"skin=user_01&language=en&menu=livewithtux")
+paramsString = "skin=user_01&language=%s&menu=livewithtux" % GUI_LANGUAGE
+resourcesManager.addBinding("user", "wi_user_01", "index", paramsString)
+resourcesManager.addBinding("user/index", "wi_user_01", "index", paramsString)
 
 # 
------------------------------------------------------------------------------
 # Declaration of the service "live_with_tux".


------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to