开发者

Play framework: How can i use "conf/messages"-messages in html-files?

开发者 https://www.devze.com 2023-03-20 03:36 出处:网络
How开发者_开发问答 does it work? Simply with &{messages.message1} when the messages file looks like this:

How开发者_开发问答 does it work? Simply with &{messages.message1} when the messages file looks like this:

message1 = hallo


Everything you need to know about Internationalisation can be found in the documentation here.

You don't need the messages part in your example. If you want to look up messages1 in your messages file, you just use

&{messages1}

I'd recommend reading the documentation though, as it explains how to use multiple languages and how to set that up. Also take a look at this example - Java Playframework Internationalization doesn't work.


As per documentation, use:

&{'messages.message1'}

(take notice of the single quotes) and add to "messages" file:

 messages.message1=your text
0

精彩评论

暂无评论...
验证码 换一张
取 消