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

How it works? Just with & {messages.message1} when the message file looks like this:

message1 = hallo

+6
source share
2 answers

According to the documentation, use:

&{'messages.message1'} 

(pay attention to single quotes) and add "messages" to the file:

  messages.message1=your text 
+1
source

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

You do not need the messages part in your example. If you want to find messages1 in your message file just use

 &{messages1} 

I would recommend reading the documentation as it explains how to use several languages ​​and how to install it. Also consider this example - Java Playframework interpretation does not work .

+3
source

Source: https://habr.com/ru/post/892656/


All Articles