<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Yves,<br>
<br>
the parameter '__locale' will only be evauluated once for each
request by the CmsDefaultLocaleHandler before your template jsp or
any other resource gets rendered. If you want to set the locale
depending on a cookie value, you should really implement you own
locale handler by implementing org.opencms.i18n.I_CmsLocaleHandler
or extending org.opencms.i18n.CmsDefaultLocaleHandler. You can set
the global locale handler within /WEB-INF/config/opencms-system.xml
at opencms/system/internationalization/localehandler.<br>
<br>
If you still need to do an include with another locale than the
current request-context locale, you still could use the OpenCms API
by calling <br>
<br>
org.opencms.jsp.CmsJspTagInclude.includeTagAction(<br>
PageContext context,<br>
String target,<br>
String element,<br>
Locale locale,<br>
boolean editable,<br>
boolean cacheable,<br>
Map<String, String[]> paramMap,<br>
Map<String, Object> attrMap,<br>
ServletRequest req,<br>
ServletResponse res)<br>
<br>
This is the same method used by the include tag, only that you can't
set another locale than the current through the tag.<br>
<br>
Greetings,<br>
Tobias<br>
<pre class="moz-signature" cols="300">
--
Alkacon Software GmbH - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> -- <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a>
</pre>
<br>
Am 05.10.2011 10:29, schrieb Yves Glodt:
<blockquote
cite="mid:CAAPhX7cDLDSLvnn2iHoAmdFdrE=nHBUFm1u7W9ognvUkf=ZVAw@mail.gmail.com"
type="cite">Hello,<br>
<br>
in my attempt to create a proof-of-concept of a
multilanguage-website without the needs for /en/, /de/, /fr/
folders and siblings, I tried the following in my template:<br>
<br>
<span style="font-family: courier new,monospace;"><cms:include
element='body' editable="true"></span><br style="font-family:
courier new,monospace;">
<span style="font-family: courier new,monospace;">
<cms:param name="__locale">${empty cookie.lang.value ?
'en' : </span><span style="font-family: courier new,monospace;">cookie.lang.value</span><span
style="font-family: courier new,monospace;">}</cms:param></span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></cms:include></span><br
style="font-family: courier new,monospace;">
<br>
But it does not work as expected. The <span style="font-family:
courier new,monospace;">__locale </span>parameter seems to be
ignored. I use OpenCms 7.5.4 here.<br>
<br>
Someone else already had this problem: <a moz-do-not-send="true"
href="http://mail.opencms.org/pipermail/opencms-dev/2008q4/030850.html">http://mail.opencms.org/pipermail/opencms-dev/2008q4/030850.html</a><br>
<br>
Is there a solution in the meantime?<br>
<br>
Best regards,<br>
Yves<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
_______________________________________________
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>
</body>
</html>