[opencms-dev] script-output depending on locale

Christian Steinert christian_steinert at web.de
Tue Aug 1 23:54:49 CEST 2006


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060801/9a3a68cf/attachment.bin>


More information about the opencms-dev mailing list