How to show localization messages with parameters in Spring 3 / Thymeleaf

前端 未结 3 2027
失恋的感觉
失恋的感觉 2020-12-13 02:06

I\'m using Spring 3 and Thymeleaf to make some webpages and I am lost as for how to show messages like this:

welcome.message=Hello {0}, welcome!

and then rep

3条回答
  •  执念已碎
    2020-12-13 02:49

    You can even use a calculated message key as a parameter:

    Above, the parameter of [msg3] is a message key [#{key}] where key is itself calculated [${param4}]. The benefit is that you can insert internationalized calculated fragments in an internationalized message.

提交回复
热议问题