Struts select tag localization implementation

前端 未结 2 1686
北恋
北恋 2020-12-07 03:35

Following is the Struts code for the tag in my JSP file.



        
相关标签:
2条回答
  • 2020-12-07 04:07

    At your properties file place that equations:

    addTolist = Ajouter à Ma liste
    removeFromList = Enlever de ma liste
    ...
    

    At Java side you can reach them with:

    listValue=getText("addTolist");
    ...
    

    So, at jsp side try that:

    <s:select ... listValue="%{getText(addTolist)}, ..." ... /> // You should fill the '...' places
    
    0 讨论(0)
  • 2020-12-07 04:18

    Using s:set tag, you can use I18N text in JSP.

    <s:set var="fooLavel" value="getText('foo.bar')"/>
    <s:select name="fooselect" list="#{'foo': #fooLavel}" ...
    
    0 讨论(0)
提交回复
热议问题