邮件文件未选择单引号

时间:2019-05-06 07:35:54

标签: playframework-2.6

Play Framework中,messages文件用于本地化。我已经在其中添加了以下键值,但该值中的单引号没有被选择。

error.incorrectTag = The specified tag doesn't exist in the system

当我使用以下代码打印以上消息时

println(s"${messagesApi("error.incorrectTag")(langs.availables(0))}")

我看到了The specified tag doesnt exist in the system(没有单引号)

如何打印单引号?

1 个答案:

答案 0 :(得分:0)

您需要使用双引号'来对单引号''进行转义,如下所示:

error.incorrectTag = The specified tag doesn''t exist in the system