SV: SV: [opencms-dev] mutlilanguage site
Felix Sprick
felix.sprick at netlight.se
Wed Oct 18 16:31:58 CEST 2006
Volkmar, I forgot to add further java declarations that you require. Try
this
<%@ page session="false"
import="org.opencms.jsp.CmsJspActionElement, java.util.Locale"%>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"%>
<%
CmsJspActionElement cms = new CmsJspActionElement(pageContext,
request, response);
Locale en = new Locale(en);
Locale de = new Locale(de);
String contenten = cms.getContent("/test/portal/index.html",
"content_area", en);
String contentde = cms.getContent("/test/portal/index.html",
"content_area", de);
out.println(contenten);
out.println(contentde);
%>
/Felix
_____
Från: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] För Volkmar Emberger
Skickat: den 18 oktober 2006 16:19
Till: The OpenCms mailing list
Ämne: Re: SV: [opencms-dev] mutlilanguage site
thx sami: but I don't want to cut my site into microsites because of my
multiclient capability I would have a site in a site in a site and that is
what I absolutely don't want!
@felix: I think this is a very newbie mistake but with this testcode:
6 <%
7 String contenten = cms.getContent("/test/portal/index.html",
"content_area", "en");
8 String contentde = cms.getContent("/test/portal/index.html",
"content_area", "de");
9 out.println(contenten);
10 out.println(contentde);
11 %>
I get an this error:
javax.servlet.jsp.JspException: Unable to compile class for JSP
An error occurred at line: 6 in the jsp file:
/WEB-INF/jsp/offline/system/modules/ch.test.templates/elements/content.tpl.j
sp
Generated servlet error:
cms cannot be resolved
Do I have to specify this link absolut?
Volkmar
Felix Sprick schrieb:
You can also access the content from the scriptlet API. You can do something
like that:
String content = cms.getContent("/[url-to-content-file], "[name of part you
want to include, e.g. text1", [locale]);
And then print out the content:
out.println(content);
Felix
_____
Från: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] För Sami Nygard
Skickat: den 18 oktober 2006 15:37
Till: The OpenCms mailing list
Ämne: Re: [opencms-dev] mutlilanguage site
Hi Volkmar,
General concept seems to be to use siblings for multilanguage sites and
control the locale in the folder properties.
See this forum entry:
http://www.opencms-forum.de/opencms-forum/viewthread?thread=1769#4501
/Sami
On Oct 18, 2006 03:13 PM, Volkmar Emberger wrote:
> Hi there,
> Is there a cms-tag for calling the other page languages in opencms?
> I have pages with free text in 2 different languages and now I want to
> change these by clicking on a link in the frontend.
>
> best regards
> V.Emberger
>
> _______________________________________________
> 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
> http://lists.opencms.org/mailman/listinfo/opencms-dev
Sami Nygard
Wombat
_____
_______________________________________________
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
http://lists.opencms.org/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061018/abce9664/attachment.htm>
More information about the opencms-dev
mailing list