Simple way to use parameterised UI messages in Wicket?

后端 未结 6 649
借酒劲吻你
借酒劲吻你 2021-01-02 02:43

Wicket has a flexible internationalisation system that supports parameterising UI messages in many ways. There are examples e.g. in StringResourceModel javadocs, such as thi

6条回答
  •  天命终不由人
    2021-01-02 03:21

    Take a look at Example 4 in the StringResourceModel javadoc - you can pass a null model and explicit parameters:

    add(new Label("message",
             new StringResourceModel(
                 "msg", this, null, value)));
    
    msg=Value is {0}
    

提交回复
热议问题