commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pham Anh Tuan" <anht...@ichi-corp.jp>
Subject Re: [resources/i18n] was: Re: [HELP] Can or can not call a specific message group in*.properties
Date Tue, 26 Jul 2005 02:06:49 GMT
Thank you very much, Mattias.

If you could, plz show me a simple example :") for clearly understanding!

Pham
----- Original Message ----- 
From: "Mattias Jiderhamn" <mj-lists@expertsystem.se>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Monday, July 25, 2005 11:31 PM
Subject: Re: [resources/i18n] was: Re: [HELP] Can or can not call a specific 
message group in*.properties


> 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:
>>
>>[loginForm]
>>username=User name:
>>firstname=First name:
>>
>>[userHome]
>>hello=Hello
>>
>>.... 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
> (http://jakarta.apache.org/commons/sandbox/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:
>   userHome.hello=Hello
>
>
>
>
>   Mattias Jiderhamn
>   Expert Systems
>
>   Mail:
> <mailto:mattias.jiderhamn@expertsystem.se>mattias.jiderhamn@expertsystem.se
>   Web: <http://www.expertsystem.se/>www.expertsystem.se
>   Skype: <callto://mattiasj78>mattiasj78
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message