You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mattias Jiderhamn <mj...@expertsystem.se> on 2005/07/26 21:50:52 UTC
Re: [resources/i18n] was: Re: [HELP] Can or can not call a
specific message group in*.properties
At 2005-07-26 04:06, you wrote:
>Thank you very much, Mattias.
>
>If you could, plz show me a simple example :") for clearly understanding!
Example of how to use i18n? See
http://jakarta.apache.org/commons/sandbox/i18n/examples.html
>>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
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org