<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-7" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Christoph,<br>
<br>
Here are some ways of accessing the locale property:<br>
<br>
<b><cms:property name="locale" default="en" /></b><br>
<br>
to read the locale property or set it in a JSTL variable:<br>
<br>
<b><c:set var="PageISOLang" scope="page"><cms:property
name="locale" default="en" /></c:set></b><br>
<br>
and either access it using:<br>
<br>
<b><c:out value="${PageISOLang}" /></b><br>
or<br>
<b><%= cmsae.getJspContext().getAttribute("PageISOLang") %></b><br>
<br>
where cmsae is your CmsJspActionElement created like:<br>
<br>
<% CmsJspActionElement cmsae=new CmsJspActionElement(pageContext,
request, response); %><br>
<br>
It is also assumed that you have already included in your JSP the
following declarations:<br>
<br>
<%@ page import="java.util.*,org.opencms.jsp.*" %><br>
<%@ taglib prefix="cms" uri=<a class="moz-txt-link-rfc2396E" href="http://www.opencms.org/taglib/cms">"http://www.opencms.org/taglib/cms"</a> %><br>
<%@ taglib prefix="c" uri=<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/jstl/core">"http://java.sun.com/jstl/core"</a> %><br>
<br>
Regards,<br>
Panos<br>
<br>
Christoph P. Kukulies wrote:
<blockquote cite="mid20060317115837.GA1798@physik.rwth-aachen.de"
type="cite">
<pre wrap="">I'm in need for a code snippet.
My navigation needs to display different images containing
names in german resp. english. I need to decide whether the
locale is String "de" or String "en" and build the
image name src="/galleries/pics/"<%=locale%>_navicon"
corresponding to the locale of the page.
Do I use a bean and which one and what would the
preparing code to obtain the locale?
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Panagiotis Th. Kavalagios
Electrical & Computer Engineer
European Dynamics S.A.
Athens, Hellas
Tel: +30-210-8094500
</pre>
</body>
</html>