2012-10-25 107 views
0

如何在html的輸入標籤中使用i18n消息?例如:html標籤中的Grails i18n消息

<input type="text" name="username" placeholder="${message(code:'placeholder.username')}" 

以幾個語言顯示佔位符文本。

回答

2
<input type="text" name="username" placeholder="${message(code: 'placeholder.username')}"> 
+0

它不工作。我忘了把代碼放在CODE後面。 –

+0

它應該工作。你有什麼輸出?有什麼異常嗎? –

+0

沒有任何異常。但在輸入我看到placeholder.username而不是用戶名。 –