[opencms-dev] locale property - problem in 7.5.0 (7.0.5 also)
Christoph P. Kukulies
kuku at physik.rwth-aachen.de
Mon Sep 7 16:04:48 CEST 2009
I'm noticing that some pages no longer work when I'm trying to obtain
the locale property:
<%@page import="org.opencms.jsp.*,org.opencms.file.*,java.util.*" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="locale"><cms:property name="locale" file="search"/></c:set>
<fmt:setLocale value="%{locale}"/>
<fmt:bundle basename="messages">
<cms:template element="foot">
<hr/>
<%
CmsJspActionElement cms = new CmsJspActionElement(pageContext,
request, response);
String currentUri =cms.getRequestContext().getUri();
String loc=cms.property("locale", "search");
String path= currentUri.substring(0,currentUri.lastIndexOf('/'));
%>
<div class="footbox"><div class="left">
<%
if(loc.equals("de")) { %>
<a href="/de/about/Impressum.htm" ><fmt:message
key="fussnote"/></a>
<% } else { %>
<a href="/en/about/Impressum.htm"><fmt:message
key="fussnote"/></a>
<%
}
%>
</div>
<div class="right"><a class="right" href="#"><img
src="<cms:link>/galleries/pics/pfeil.gif</cms:link>"
alt="Beginn"/><fmt:message key="up"/></a>
</div></div>
</cms:template>
</fmt:bundle>
Somehow the locale is not recognized. Always the en - version is shown
although the page has the "de" locale.
I changed (locale) to {locale} also to no avail.
Before that I had changed
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
to
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
More information about the opencms-dev
mailing list