[opencms-dev] script-output depending on locale
Jens Kreutschmann
jens at nephila.de
Wed Aug 2 01:04:30 CEST 2006
Sorry,
I have found out right now, that i have to export the module in order to
make this work. I am not sure why, but it seems that was the problem. If
someone can explain this to me, I would be glad. But since i can work now it
isn't really important.
Thanks
Jens
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]On Behalf Of Jens Kreutschmann
Sent: Wednesday, August 02, 2006 12:35 AM
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] script-output depending on locale
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
_______________________________________________
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
More information about the opencms-dev
mailing list