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

前端 未结 5 2242
北海茫月
北海茫月 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

    In the end we decided to side-step the single quote problem by always using ‘curly’ quotes:

    warning.item = This item\u2019s {0} is not valid.
    

提交回复
热议问题