commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mattias Jiderhamn <>
Subject Re: [resources/i18n] was: Re: [HELP] Can or can not call a specific message group in*.properties
Date Mon, 25 Jul 2005 16:31:02 GMT
At 2005-07-25 08:20, you wrote:
>Hi all,
>I wonder whether or not the Messages files (*.properties) in Struts 
>support a message definition form like a config file of Smarty or not?
>in Smarty config file:
>username=User name:
>firstname=First name:
>.... so, with above definition form, we can call specific message 
>group that we need. For example, if we only need messages for Login Form.

Seems this could be a job for the sandbox component i18n 
(, which I am 
currently working on. One of the advantages of i18n over Resources is 
that you can group messages together using a common ID ("loginForm"). 
You could write your own implementation of the MessageProvider 
interface, that parses Smarty files into i18n messages (if you do, 
please consider contributing it). You could then easily create your 
own JSP tags to use these messages (I could guide you here if needed).

On the other hand, you may be able to achieve what you want by simply 
prepending the "group". I.e.
   loginForm.username=User name:
   loginForm.firstname=First name:

   Mattias Jiderhamn
   Expert Systems

   Web: <>
   Skype: <callto://mattiasj78>mattiasj78

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message