[opencms-dev] script-output depending on locale
Jens Kreutschmann
jens at nephila.de
Wed Aug 2 00:34:31 CEST 2006
Thanks for your answer, I also put the files there, since i wasnt sure and
it still doesnt work. Now I followed your idea and renamed the files to
workplace.properties, then i restarted tomcat and it still doesnt work.
(sure i changed the line with getMessages to
...getMessages("de.mymodule.main.workplace",...) now)
Now i am wondering.. is there something more i have to do then just putting
these files with the right name into the right place? because i really think
they are in the right place.
greetings
Jens
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]On Behalf Of Christian Steinert
Sent: Tuesday, August 01, 2006 11:55 PM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] script-output depending on locale
Jens Kreutschmann schrieb:
> Hello,
> I have a problem i cannot solve. I have a script and i want the output
> generated in different languages. The script is placed in
> /system/modules/de.mymodule.main/elements/myscript.jsp
> I have created three files main.properties, main_en.properties and
> main_de.properties and placed them in
> /system/modules/de.mymodule.main/classes.
> Now i try to access these values in myscript.jsp with:
>
>
> CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
> response);
>
out.println(cms.getMessages("de.mymodule.main",cms.property("locale","search
> ")).key("foo"));
>
> but this outputs: ??? foo ???.
>
> I am not sure, what i dont understand, but there has to be something i am
> missing. Can some kind person point me into the right direction? I would
be
> glad.
>
> Thanks in advance
> Jens
>
I think you have to put your property files into the folder:
/system/modules/de.mymodule.main/classes/de/mymodule/main/
Also, I don't know, if the file name is ok like this. I have only worked
with the file names
workplace.properties / workplace_en.properties
Then it should hopefully work.
christian
More information about the opencms-dev
mailing list