Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 508
developer_joe Avatar asked Jul 13 '11 08:07

developer_joe


2 Answers

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.

like image 182
Codemwnci Avatar answered Oct 19 '22 09:10

Codemwnci


As per documentation, use:

&{'messages.message1'}

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

 messages.message1=your text
like image 1
Pere Villega Avatar answered Oct 19 '22 08:10

Pere Villega