You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/09/30 12:23:18 UTC

svn commit: r820234 - in /ofbiz/trunk/framework/guiapp: config/xui.properties src/org/ofbiz/guiapp/xui/XuiContainer.java

Author: jleroux
Date: Wed Sep 30 10:23:18 2009
New Revision: 820234

URL: http://svn.apache.org/viewvc?rev=820234&view=rev
Log:
Allow to use another language than the default one (locale) in the POS

Modified:
    ofbiz/trunk/framework/guiapp/config/xui.properties
    ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java

Modified: ofbiz/trunk/framework/guiapp/config/xui.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/guiapp/config/xui.properties?rev=820234&r1=820233&r2=820234&view=diff
==============================================================================
--- ofbiz/trunk/framework/guiapp/config/xui.properties (original)
+++ ofbiz/trunk/framework/guiapp/config/xui.properties Wed Sep 30 10:23:18 2009
@@ -18,4 +18,7 @@
 #####################################################################
 
 # If isSameLogin equals "true", a logged off user (blocked, time out, ...) can only log in with the same login/pwd couple. isSameLogin is false by default (false used for that)
-isSameLogin=false
\ No newline at end of file
+isSameLogin=false
+# to force a language despite the default locale. Useful to test with another language for instance...
+# However to force the PosUiLabels.xml side you still need to use something like "-Duser.language=en" on the command line
+languageSuffix=en

Modified: ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java?rev=820234&r1=820233&r2=820234&view=diff
==============================================================================
--- ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java (original)
+++ ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java Wed Sep 30 10:23:18 2009
@@ -137,7 +137,13 @@
             if (args.length > 0) {
                 startupProperties = args[0];
             }
-            String suffix = Locale.getDefault().getLanguage();
+            String languageSuffix = UtilProperties.getPropertyValue("xui.properties", "languageSuffix", "");
+            String suffix = null;
+            if(UtilValidate.isEmpty(languageSuffix)) {
+                suffix = Locale.getDefault().getLanguage();
+            } else {
+                suffix = languageSuffix;
+            }
             if ("en".equals(suffix)) {
                 suffix = "";
             } else {