问题
I want to put conf/messages into subfolder, like conf/lang/messages. There is nothing about this in documentation: https://www.playframework.com/documentation/2.4.x/JavaI18N.
Did someone resolve this problem ?
回答1:
This Messages.scala source code has a clue:
protected val messagesPrefix =
config.getDeprecated[Option[String]]("play.i18n.path", "messages.path")
I have not tried it in 2.4 yet, but it looks worth taking for a spin.
回答2:
You can specify the sub-directory in application.conf by adding:
play.i18n.path = "lang"
Doing so will tell Play to read the messages files from conf/lang.
来源:https://stackoverflow.com/questions/33593310/play-framework-i18n-messages-in-subfolders