English 中文(简体)
对i18n电文采用html格式
原标题:Apply html formatting to i18n messages

在比赛中! 2.0 我们可以把论点传递给一18条这样的信息:

我认为:(message.key = 任务.created with debate: firstName and a Code)

<div class="alert alert-success">
<a class="close" data-dismiss="alert">×</a>
    @Messages("task.created", MyContext.currentUser().firstName, newTask.code)
</div>

我的信息被定义为:

task.created=<strong>{0}</strong>, your task has been saved with code {1}

我愿见firstName, 带有超文本标签,但不要使用强标,而只是印刷<>strong。

我希望你理解我的问题。 在玩乐中,这是可能的吗?

感谢!

最佳回答

希望:

@Html(Messages("task.created", MyContext.currentUser().firstName, newTask.code))

我希望这能够帮助你们!

问题回答

暂无回答




相关问题
How to create a custom validator in Play Framework 2.0?

Play 1.0 comes with a full featured validation framework base on http://oval.sourceforge.net/. With the release of 2.0, my custom validators do not work anymore. How does one create custom validator ...

How to contribute modules in Play Framework 2.0?

The original Play Framework 1.x had an elegant and simple module management system. Coupled with the Play repository, it was a great way to quickly enhance an application with third party components &...

How to define a tag with Play 2.0?

There isn t much documentation about Play 2.0 template engine. How does one create a tag using Scala template?

热门标签