放置在资源包中时,撇号无法正确转换 [英] Apostrophe doesn't get translated properly when placed in a resource bundle

查看:71
本文介绍了放置在资源包中时,撇号无法正确转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当置于资源包中时,撇号无法正确翻译。

Apostrophe doesn't get translated properly when placed in a resource bundle.

key = {0}'s brush is {1} centimeters tall

(e.g. Sam's brush is 4 centimeters tall)

如果我从 java.util.ResourceBundle 格式化上述键,撇号就会丢失。这里可能出现什么问题?

The apostrophe gets missed if I format the above key from a java.util.ResourceBundle What could be the problem here?

推荐答案

您应该将单引号转义为

key = {0}''s brush is {1} centimeters tall

这篇关于放置在资源包中时,撇号无法正确转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆