【发布时间】:2014-02-28 10:22:19
【问题描述】:
你好,
我正在使用 Play!使用 Scala 模板构建应用程序的框架,但我遇到了一个问题..
我有这个代码:
@template("Homepage") {
<p>Some Content</p>
}
我正在尝试将参数“国际化”,我尝试了一些不同的可能性,例如:
作为“标准”参数
@template("@Messages('homepage')")
通过变量
@defining(@Messages("homepage")) { title =>
@template(@title) {
甚至在模板中
@tempate("homepage")
[... and in the template]
<title>@Message("@title")</title>
但是没办法……每次我得到编译错误或者我在 HTML 页面中得到字符串“@Message('..')”或“@title”
有人知道怎么做吗?
【问题讨论】:
标签: scala templates playframework internationalization playframework-2.0