2014-07-23 26 views
0
做國際化時

所以我有幾個消息在我的屬性文件看起來像這樣:使用參數/ {0}替代的速度

email.errordetailstemplate.subject=An error occurred in {0} 
email.errordetailstemplate.errordetails=--- Error details --- 

recommendations here話,我可以很容易地做到這一點去:

$messages.getMessage("email.errordetailstemplate.errordetails", null, $locale) 

...但我希望能夠做的是能夠做到的{0}這樣的換人:

$messages.getMessage("email.errordetailstemplate.subject", $productname, $locale) 

我相信這是可能的,但我無法弄清楚正確的語法。有人可以幫我嗎?

回答