[Yanel-commits] rev 36295 - public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect

michi at wyona.com michi at wyona.com
Fri May 2 11:06:41 CEST 2008


Author: michi
Date: 2008-05-02 11:06:40 +0200 (Fri, 02 May 2008)
New Revision: 36295

Modified:
   public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java
Log:
use actual localization

Modified: public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java
===================================================================
--- public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java	2008-05-02 08:55:46 UTC (rev 36294)
+++ public/yanel/contributions/resources/redirect/src/java/org/wyona/yanel/impl/resources/redirect/RedirectResource.java	2008-05-02 09:06:40 UTC (rev 36295)
@@ -99,7 +99,10 @@
 
             // Localization
             Configuration[] languageRedirectConfigs = config.getChildren("language");
-            String localizationLanguage = getRequestedLanguage();
+
+            // NOTE: Within realm.xml one can overwrite the language handler, for example using the content language instead, which is overwriting getRequestedLanguage(), but this doesn't make sense in the case of the redirect resource (also see http://lists.wyona.org/pipermail/yanel-development/2008-April/002150.html)
+            String localizationLanguage = new org.wyona.yanel.impl.DefaultLanguageHandler().getLocalizationLanguage(this);
+            //String localizationLanguage = getRequestedLanguage();
             log.debug("Localization: " + localizationLanguage);
             for (int i = 0; i < languageRedirectConfigs.length; i++) {
                 try {



More information about the Yanel-commits mailing list