开发者

How to format resource bundle values to be shown in HTML format

key={0}/{1} + {2}/{3}

The above value is defined in a resource bundle and is shown as HTML text in the user interface. The above demonstrates adding fractions and开发者_如何学JAVA I would like to format this in HTML format. Would it be possible to do this in the resource bundle property file itself. If so, how should I do this?


If I understand your needs correctly, then you can specify the formating in the resource file. For example add some html tags:

key=<i>{0}/{1}</i> + <b>{2}/{3}</b>


You can put your html code in your resource file. If you're using MessageFormat, quotes should be doubled though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜