developer_joe
developer_joe

Reputation: 301

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

How does it work? Simply with &{messages.message1} when the messages file looks like this:

message1 = hallo

Upvotes: 6

Views: 2715

Answers (2)

Codemwnci
Codemwnci

Reputation: 54884

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.

Upvotes: 3

Pere Villega
Pere Villega

Reputation: 16439

As per documentation, use:

&{'messages.message1'}

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

 messages.message1=your text

Upvotes: 1

Related Questions