[opencms-dev] Problems with locale

David Santos david.santos at opensoft.pt
Mon Sep 26 17:55:19 CEST 2005


Hello

I’m making a site in tow languages Portuguese and English but I was trying
to avoid using the approach of having tow subfolders /pt and /en each one
with its locale property set to “pt” and “en” respectively.

As I was investigating on this issue, I found the following in
/alkacon-documentation/ documentation_taglib/docu_tag_include.html:

<cms:include file="../elements/template-nav-top.jsp">
<cms:param name="__locale"><%= locale %></cms:param>
<cms:param name="__navpart" value="toprow" />
</cms:include>

I assumed that if the JSP variable ‘locale’ had the value, let’s say, “pt”
than the file template-nav-top.jsp would be included with the __locale set
to “pt”. It seems I have assumed wrong though because I made the following
code to try it and it didn’t work:

<%
String locale = "pt";
%>


<html>
<head>
<title></title>
</head>

<body>

<cms:include file="index.html" element="body">
	<cms:param name="__locale"><%= locale %></cms:param>
</cms:include>

</body>
</html>

I even tried this:

<%
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
java.util.HashMap parameters = new java.util.HashMap();
parameters.put("__locale", "pt");
%>


<html>
<head>
<title></title>
</head>

<body>

<%
cms.include("index.html", "body", parameters);
%>

</body>
</html>

But it still didn’t work :(

Could someone tell me please if I’m assuming something wrong or is there
some problem with this way of including files?

Thanks in advance,

David Santos  david.santos at opensoft.pt
______________________________________________
OPENSOFT LDA                   www.opensoft.pt
  Taguspark - Núcleo Central, Sala 204
  2780-920 Porto Salvo
Tel: (+351) 91 732 2848




More information about the opencms-dev mailing list