Should I use java.text.MessageFormat for localised messages without placeholders?

前端 未结 5 2131
北海茫月
北海茫月 2021-02-20 03:55

We are localising the user-interface text for a web application that runs on Java 5, and have a dilemma about how we output messages that are defined in properties files - the k

5条回答
  •  醉话见心
    2021-02-20 04:38

    Use the ` character instead of ' for quoting. We use it all the time without problems.

    Use MessageFormat only when you need it, otherwise they only bloat up the code and have no extra value.

提交回复
热议问题