You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Johnson nickel <sa...@elogic.co.in> on 2009/04/24 08:04:54 UTC

Struts2 localization

Hi all, 
 
          I want to know about struts 2 localization.  I have seen the
struts 2 documentation
 i'm not getting clear idea. Can anybody  provide the basic steps for
implementing this 
localization concept. 
-- 
View this message in context: http://www.nabble.com/Struts2-localization-tp23210433p23210433.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Struts2 localization

Posted by Martin Gainty <mg...@hotmail.com>.
a definite maybe  

I like specific examples e.g. such as this implementation of i18n tag e.g. s:i18n
http://struts.apache.org/2.0.14/docs/localization.html

if only someone would write a book which would explain all of this
Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> Date: Fri, 24 Apr 2009 11:05:19 -0400
> From: newton.dave@yahoo.com
> To: user@struts.apache.org
> Subject: Re: Struts2 localization
> 
> Martin Gainty wrote:
> > the example uses configuration to preset the value of input element
> > 
> > <s:checkbox name="useAccessControl"
> >  value="%{configuration.getBoolean('use_access_control')}"
> >  required="false" labelposition="left"
> >  label="%{getText('access_control.access_control.use_access_control.label')}"/>
> > 
> > could you provide what configuration is in this context?
> 
> I'd bet it's a boolean signifying whether or not to use access control.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Rediscover Hotmail®: Get quick friend updates right in your inbox. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates2_042009

Re: Struts2 localization

Posted by Dave Newton <ne...@yahoo.com>.
Martin Gainty wrote:
> the example uses configuration to preset the value of input element
> 
> <s:checkbox name="useAccessControl"
>  value="%{configuration.getBoolean('use_access_control')}"
>  required="false" labelposition="left"
>  label="%{getText('access_control.access_control.use_access_control.label')}"/>
> 
> could you provide what configuration is in this context?

I'd bet it's a boolean signifying whether or not to use access control.

Dave


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


RE: Struts2 localization

Posted by Martin Gainty <mg...@hotmail.com>.
thanks for the explanation
the example uses configuration to preset the value of input element

<s:checkbox name="useAccessControl"
 value="%{configuration.getBoolean('use_access_control')}"
 required="false" labelposition="left"
 label="%{getText('access_control.access_control.use_access_control.label')}"/>

could you provide what configuration is in this context?

thx,
Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> Date: Fri, 24 Apr 2009 09:49:25 -0400
> From: Terry.Gardner@Sun.COM
> Subject: Re: Struts2 localization
> To: user@struts.apache.org
> 
> Here is an example from a JSP:
> 
> 	    <%-- use access control --%>
> 	    <div class="use_access_control_entry checkbox">
> 	      <h2><s:text  
> name="access_control.access_control.use_access_control.label"/></h2>
> 
> 	      <span class="description">
> 		<s:text  
> name="access_control.access_control.use_access_control.description"/>
> 	      </span>
> 		<s:checkbox
> 		   name="useAccessControl"
> 		   value="%{configuration.getBoolean('use_access_control')}"
> 		   required="false"
> 		   labelposition="left"
> 		   label="% 
> {getText('access_control.access_control.use_access_control.label')}"/>
> 	    </div>
> 
> In this example, "s<text name="..."/>" and getText('...') access  
> resource bundles.
> 
> For this example to work correctly, there must be a way to resolve the  
> <s:text> and getText() values. In my case, there is a set of resource  
> bundles specifically associated the action, in this case the Action  
> that is the model for this view is named AccessControlAction, so the  
> resource bundles are named AccessControlAction_[XX].properties, and  
> live alongside the AccessControlAction.class file. Further, the bundle  
> for English is named AccessControlAction_en.properties, Spanish  
> AccessControlAction_es.properties, and so forth or each language.
> 
> 
> On Apr 24, 2009, at 9:37 AM, Dave Newton wrote:
> 
> > Johnson nickel wrote:
> >> I want to know about struts 2 localization.  I have seen the
> >> struts 2 documentation i'm not getting clear idea. Can anybody
> > > provide the basic steps for implementing this localization concept.
> >
> > Provide a package.properties file for package-level messages.  
> > Provide (actionName).properties file for action-specific messages,  
> > where (actionName) is either the name of an action, and action  
> > superclass, and interface, or interface superclass. You can also  
> > define app-wide message resource files using the constant mentioned  
> > in the documentation.
> >
> > Use getText() variants or the I18N tags to retrieve the messages in  
> > the JSP files.
> >
> > That's about it; if you can provide some feedback as to what was  
> > confusing we'll update the docs.
> >
> > Dave
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> 
> 
> ======
> 
> Terry Gardner
> Terry.Gardner@Sun.COM
> Skype: Terry_J_Gardner
> 
> "Vulcans never bluff." -- Spock
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009

Re: Struts2 localization

Posted by Terry Gardner <Te...@Sun.COM>.
Here is an example from a JSP:

	    <%-- use access control --%>
	    <div class="use_access_control_entry checkbox">
	      <h2><s:text  
name="access_control.access_control.use_access_control.label"/></h2>

	      <span class="description">
		<s:text  
name="access_control.access_control.use_access_control.description"/>
	      </span>
		<s:checkbox
		   name="useAccessControl"
		   value="%{configuration.getBoolean('use_access_control')}"
		   required="false"
		   labelposition="left"
		   label="% 
{getText('access_control.access_control.use_access_control.label')}"/>
	    </div>

In this example, "s<text name="..."/>" and getText('...') access  
resource bundles.

For this example to work correctly, there must be a way to resolve the  
<s:text> and getText() values. In my case, there is a set of resource  
bundles specifically associated the action, in this case the Action  
that is the model for this view is named AccessControlAction, so the  
resource bundles are named AccessControlAction_[XX].properties, and  
live alongside the AccessControlAction.class file. Further, the bundle  
for English is named AccessControlAction_en.properties, Spanish  
AccessControlAction_es.properties, and so forth or each language.


On Apr 24, 2009, at 9:37 AM, Dave Newton wrote:

> Johnson nickel wrote:
>> I want to know about struts 2 localization.  I have seen the
>> struts 2 documentation i'm not getting clear idea. Can anybody
> > provide the basic steps for implementing this localization concept.
>
> Provide a package.properties file for package-level messages.  
> Provide (actionName).properties file for action-specific messages,  
> where (actionName) is either the name of an action, and action  
> superclass, and interface, or interface superclass. You can also  
> define app-wide message resource files using the constant mentioned  
> in the documentation.
>
> Use getText() variants or the I18N tags to retrieve the messages in  
> the JSP files.
>
> That's about it; if you can provide some feedback as to what was  
> confusing we'll update the docs.
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


======

Terry Gardner
Terry.Gardner@Sun.COM
Skype: Terry_J_Gardner

"Vulcans never bluff." -- Spock


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


Re: [Struts 2] Menu with tabs: Dojo, Ajax or jQuery tag ?

Posted by Paweł Wielgus <po...@gmail.com>.
Hi Fernandes,
this question has no good answer.
I think the best option is to use something You know,
so if it's JQuery, than use it, or anything else You prefer.

Best greetings,
Paweł Wielgus.

2009/4/24 Fernandes Celinio <cf...@sopragroup.com>:
> Hi,
> I need to make a screen with several tabs.
> I am wondering what is the best solution.
>
> I know the Dojo tag that comes with truts 2 : tabbedpanel.
> It seems to work rather well, but Dojo tags are deprecated i believe ?
>
> Are there any other solutions ? With jQuery ? Pure Ajax ?
>
> I am using Struts 2.0.14 and Websphere 6.1
>
> Thanks for your feedback.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


[Struts 2] Menu with tabs: Dojo, Ajax or jQuery tag ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
Hi,
I need to make a screen with several tabs.
I am wondering what is the best solution.

I know the Dojo tag that comes with truts 2 : tabbedpanel.
It seems to work rather well, but Dojo tags are deprecated i believe ?

Are there any other solutions ? With jQuery ? Pure Ajax ?

I am using Struts 2.0.14 and Websphere 6.1

Thanks for your feedback.

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


Re: Struts2 localization

Posted by Dave Newton <ne...@yahoo.com>.
Johnson nickel wrote:
> I want to know about struts 2 localization.  I have seen the
> struts 2 documentation i'm not getting clear idea. Can anybody
 > provide the basic steps for implementing this localization concept.

Provide a package.properties file for package-level messages. Provide 
(actionName).properties file for action-specific messages, where 
(actionName) is either the name of an action, and action superclass, and 
interface, or interface superclass. You can also define app-wide message 
resource files using the constant mentioned in the documentation.

Use getText() variants or the I18N tags to retrieve the messages in the 
JSP files.

That's about it; if you can provide some feedback as to what was 
confusing we'll update the docs.

Dave



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