Can someone please provide me with some information about localization
in struts 2.

 

I am basically trying to have 2 locale : English and German for which I
have created two different properties file. viz : index_en.properties
and index_de.properties. I have put both these file in the same working
directory as that for my Action class.

 

My action class execute method is as follows : 

 

public String execute() throws Exception {

        setMessage(getText(TITLE));             // TITLE is a final
static string refering to a key in properties file 

        return SUCCESS;

    }

 

However when I try to access the title field in my jsp  using
<s:property value="title"/>, it displays as title instead of the value
of this key.

 

 I am not sure if its able to pick up the properties files.  Any help
would be much appreciated.

 

Thanks in advance.

 

Regards,

Manoj

 

 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of Sword Intech.

Scanning of this message and addition of this footer is performed
by Websense Email Security software in conjunction with 
virus detection software.

Reply via email to