[HELP] Can or can not call a specific message group in *.properties

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[HELP] Can or can not call a specific message group in *.properties

Pham Anh Tuan-2
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.

:(

thanks for reading

Pham
Reply | Threaded
Open this post in threaded view
|

Re: [HELP] Can or can not call a specific message group in *.properties

Simon Kitching
On Mon, 2005-07-25 at 13:20 +0700, Pham Anh Tuan 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?

You should ask this question on the struts user list:
  http://struts.apache.org/mail.html

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[resources] was: Re: [HELP] Can or can not call a specific message group in*.properties

jmitchell-3
I believe Pham meant to ask about commons-resources, but isn't aware of
[commons etiquette] ;)

Pham, if you would like to provide more information about "Smarty" resources
and (preferably) a patch, we can discuss this here.

Thanks.


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
MSN:   [hidden email]
Skype: jmitchtx

----- Original Message -----
From: "Simon Kitching" <[hidden email]>
To: "Jakarta Commons Users List" <[hidden email]>
Sent: Monday, July 25, 2005 2:46 AM
Subject: Re: [HELP] Can or can not call a specific message group
in*.properties


> On Mon, 2005-07-25 at 13:20 +0700, Pham Anh Tuan 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?
>
> You should ask this question on the struts user list:
>  http://struts.apache.org/mail.html
>
> Regards,
>
> Simon
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [resources] was: Re: [HELP] Can or can not call a specific message group in*.properties

Pham Anh Tuan-2
hiz, so what can I do now, James :(

I hope that Struts will support something like what Smarty do with it's
config file :( ...

and I wonder whether or not Struts support (current Struts version) ?

Thanks,

Pham
----- Original Message -----
From: "James Mitchell" <[hidden email]>
To: "Jakarta Commons Users List" <[hidden email]>
Sent: Monday, July 25, 2005 2:06 PM
Subject: [resources] was: Re: [HELP] Can or can not call a specific message
group in*.properties


>I believe Pham meant to ask about commons-resources, but isn't aware of
>[commons etiquette] ;)
>
> Pham, if you would like to provide more information about "Smarty"
> resources and (preferably) a patch, we can discuss this here.
>
> Thanks.
>
>
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> Consulting / Mentoring / Freelance
> EdgeTech, Inc.
> http://www.edgetechservices.net/
> 678.910.8017
> AIM:   jmitchtx
> MSN:   [hidden email]
> Skype: jmitchtx
>
> ----- Original Message -----
> From: "Simon Kitching" <[hidden email]>
> To: "Jakarta Commons Users List" <[hidden email]>
> Sent: Monday, July 25, 2005 2:46 AM
> Subject: Re: [HELP] Can or can not call a specific message group
> in*.properties
>
>
>> On Mon, 2005-07-25 at 13:20 +0700, Pham Anh Tuan 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?
>>
>> You should ask this question on the struts user list:
>>  http://struts.apache.org/mail.html
>>
>> Regards,
>>
>> Simon
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [resources] was: Re: [HELP] Can or can not call a specific message group in*.properties

jmitchell-3
Are we talking about *this* smarty?
http://www.phpfreaks.com/smarty_manual/page/what.is.smarty.html


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
MSN:   [hidden email]
Skype: jmitchtx

----- Original Message -----
From: "Pham Anh Tuan" <[hidden email]>
To: "Jakarta Commons Users List" <[hidden email]>
Sent: Monday, July 25, 2005 3:54 AM
Subject: Re: [resources] was: Re: [HELP] Can or can not call a specific
message group in*.properties


> hiz, so what can I do now, James :(
>
> I hope that Struts will support something like what Smarty do with it's
> config file :( ...
>
> and I wonder whether or not Struts support (current Struts version) ?
>
> Thanks,
>
> Pham
> ----- Original Message -----
> From: "James Mitchell" <[hidden email]>
> To: "Jakarta Commons Users List" <[hidden email]>
> Sent: Monday, July 25, 2005 2:06 PM
> Subject: [resources] was: Re: [HELP] Can or can not call a specific
> message group in*.properties
>
>
>>I believe Pham meant to ask about commons-resources, but isn't aware of
>>[commons etiquette] ;)
>>
>> Pham, if you would like to provide more information about "Smarty"
>> resources and (preferably) a patch, we can discuss this here.
>>
>> Thanks.
>>
>>
>> --
>> James Mitchell
>> Software Engineer / Open Source Evangelist
>> Consulting / Mentoring / Freelance
>> EdgeTech, Inc.
>> http://www.edgetechservices.net/
>> 678.910.8017
>> AIM:   jmitchtx
>> MSN:   [hidden email]
>> Skype: jmitchtx
>>
>> ----- Original Message -----
>> From: "Simon Kitching" <[hidden email]>
>> To: "Jakarta Commons Users List" <[hidden email]>
>> Sent: Monday, July 25, 2005 2:46 AM
>> Subject: Re: [HELP] Can or can not call a specific message group
>> in*.properties
>>
>>
>>> On Mon, 2005-07-25 at 13:20 +0700, Pham Anh Tuan 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?
>>>
>>> You should ask this question on the struts user list:
>>>  http://struts.apache.org/mail.html
>>>
>>> Regards,
>>>
>>> Simon
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [resources] was: Re: [HELP] Can or can not call a specific message group in*.properties

Pham Anh Tuan-2
Yes, is my answer :)
----- Original Message -----
From: "James Mitchell" <[hidden email]>
To: "Jakarta Commons Users List" <[hidden email]>
Sent: Monday, July 25, 2005 3:10 PM
Subject: Re: [resources] was: Re: [HELP] Can or can not call a specific
message group in*.properties


> Are we talking about *this* smarty?
> http://www.phpfreaks.com/smarty_manual/page/what.is.smarty.html
>
>
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> Consulting / Mentoring / Freelance
> EdgeTech, Inc.
> http://www.edgetechservices.net/
> 678.910.8017
> AIM:   jmitchtx
> MSN:   [hidden email]
> Skype: jmitchtx
>
> ----- Original Message -----
> From: "Pham Anh Tuan" <[hidden email]>
> To: "Jakarta Commons Users List" <[hidden email]>
> Sent: Monday, July 25, 2005 3:54 AM
> Subject: Re: [resources] was: Re: [HELP] Can or can not call a specific
> message group in*.properties
>
>
>> hiz, so what can I do now, James :(
>>
>> I hope that Struts will support something like what Smarty do with it's
>> config file :( ...
>>
>> and I wonder whether or not Struts support (current Struts version) ?
>>
>> Thanks,
>>
>> Pham
>> ----- Original Message -----
>> From: "James Mitchell" <[hidden email]>
>> To: "Jakarta Commons Users List" <[hidden email]>
>> Sent: Monday, July 25, 2005 2:06 PM
>> Subject: [resources] was: Re: [HELP] Can or can not call a specific
>> message group in*.properties
>>
>>
>>>I believe Pham meant to ask about commons-resources, but isn't aware of
>>>[commons etiquette] ;)
>>>
>>> Pham, if you would like to provide more information about "Smarty"
>>> resources and (preferably) a patch, we can discuss this here.
>>>
>>> Thanks.
>>>
>>>
>>> --
>>> James Mitchell
>>> Software Engineer / Open Source Evangelist
>>> Consulting / Mentoring / Freelance
>>> EdgeTech, Inc.
>>> http://www.edgetechservices.net/
>>> 678.910.8017
>>> AIM:   jmitchtx
>>> MSN:   [hidden email]
>>> Skype: jmitchtx
>>>
>>> ----- Original Message -----
>>> From: "Simon Kitching" <[hidden email]>
>>> To: "Jakarta Commons Users List" <[hidden email]>
>>> Sent: Monday, July 25, 2005 2:46 AM
>>> Subject: Re: [HELP] Can or can not call a specific message group
>>> in*.properties
>>>
>>>
>>>> On Mon, 2005-07-25 at 13:20 +0700, Pham Anh Tuan 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?
>>>>
>>>> You should ask this question on the struts user list:
>>>>  http://struts.apache.org/mail.html
>>>>
>>>> Regards,
>>>>
>>>> Simon
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [resources/i18n] was: Re: [HELP] Can or can not call a specific message group in*.properties

Mattias Jiderhamn
In reply to this post by Pham Anh Tuan-2
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:[hidden email]>[hidden email]
   Web: <http://www.expertsystem.se/>www.expertsystem.se
   Skype: <callto://mattiasj78>mattiasj78
Reply | Threaded
Open this post in threaded view
|

Re: [resources/i18n] was: Re: [HELP] Can or can not call a specific message group in*.properties

Pham Anh Tuan-2
Thank you very much, Mattias.

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

Pham
----- Original Message -----
From: "Mattias Jiderhamn" <[hidden email]>
To: "Jakarta Commons Users List" <[hidden email]>
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:[hidden email]>[hidden email]
>   Web: <http://www.expertsystem.se/>www.expertsystem.se
>   Skype: <callto://mattiasj78>mattiasj78
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [resources] was: Re: [HELP] Can or can not call a specific message group in*.properties

jmitchell-3
In reply to this post by Pham Anh Tuan-2
Ok, now that that is cleared up.  I do not currently have a need for this,
so I'm afraid I can't help you much further.

The next step is...
If this is something you need and others agree *and* someone actually writes
the code, we can talk about getting it into resources.  Other than that, I'm
not sure what else to say.


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
MSN:   [hidden email]
Skype: jmitchtx

----- Original Message -----
From: "Pham Anh Tuan" <[hidden email]>
To: "Jakarta Commons Users List" <[hidden email]>
Sent: Monday, July 25, 2005 4:15 AM
Subject: Re: [resources] was: Re: [HELP] Can or can not call a specific
message group in*.properties


> Yes, is my answer :)
> ----- Original Message -----
> From: "James Mitchell" <[hidden email]>
> To: "Jakarta Commons Users List" <[hidden email]>
> Sent: Monday, July 25, 2005 3:10 PM
> Subject: Re: [resources] was: Re: [HELP] Can or can not call a specific
> message group in*.properties
>
>
>> Are we talking about *this* smarty?
>> http://www.phpfreaks.com/smarty_manual/page/what.is.smarty.html
>>
>>
>> --
>> James Mitchell
>> Software Engineer / Open Source Evangelist
>> Consulting / Mentoring / Freelance
>> EdgeTech, Inc.
>> http://www.edgetechservices.net/
>> 678.910.8017
>> AIM:   jmitchtx
>> MSN:   [hidden email]
>> Skype: jmitchtx
>>
>> ----- Original Message -----
>> From: "Pham Anh Tuan" <[hidden email]>
>> To: "Jakarta Commons Users List" <[hidden email]>
>> Sent: Monday, July 25, 2005 3:54 AM
>> Subject: Re: [resources] was: Re: [HELP] Can or can not call a specific
>> message group in*.properties
>>
>>
>>> hiz, so what can I do now, James :(
>>>
>>> I hope that Struts will support something like what Smarty do with it's
>>> config file :( ...
>>>
>>> and I wonder whether or not Struts support (current Struts version) ?
>>>
>>> Thanks,
>>>
>>> Pham
>>> ----- Original Message -----
>>> From: "James Mitchell" <[hidden email]>
>>> To: "Jakarta Commons Users List" <[hidden email]>
>>> Sent: Monday, July 25, 2005 2:06 PM
>>> Subject: [resources] was: Re: [HELP] Can or can not call a specific
>>> message group in*.properties
>>>
>>>
>>>>I believe Pham meant to ask about commons-resources, but isn't aware of
>>>>[commons etiquette] ;)
>>>>
>>>> Pham, if you would like to provide more information about "Smarty"
>>>> resources and (preferably) a patch, we can discuss this here.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> --
>>>> James Mitchell
>>>> Software Engineer / Open Source Evangelist
>>>> Consulting / Mentoring / Freelance
>>>> EdgeTech, Inc.
>>>> http://www.edgetechservices.net/
>>>> 678.910.8017
>>>> AIM:   jmitchtx
>>>> MSN:   [hidden email]
>>>> Skype: jmitchtx
>>>>
>>>> ----- Original Message -----
>>>> From: "Simon Kitching" <[hidden email]>
>>>> To: "Jakarta Commons Users List" <[hidden email]>
>>>> Sent: Monday, July 25, 2005 2:46 AM
>>>> Subject: Re: [HELP] Can or can not call a specific message group
>>>> in*.properties
>>>>
>>>>
>>>>> On Mon, 2005-07-25 at 13:20 +0700, Pham Anh Tuan 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?
>>>>>
>>>>> You should ask this question on the struts user list:
>>>>>  http://struts.apache.org/mail.html
>>>>>
>>>>> Regards,
>>>>>
>>>>> Simon
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [resources/i18n] was: Re: [HELP] Can or can not call a specific message group in*.properties

Mattias Jiderhamn
In reply to this post by Pham Anh Tuan-2
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: [hidden email]
For additional commands, e-mail: [hidden email]