In my game! 2.0 I would like to define the following languages:
I also created 3 files that end with the corresponding language codes:
Messages.en-GB Messages.de-DE Messages.nl-NL
When I run the application without asking for the translated key, I get the following error message:
conf/application.conf: 12: Key 'de-DE' may not be followed by token: ',' (if you intended ',' to be part of the value for 'de-DE', try enclosing the value in double quotes)
Also, when I try to access a message from a Scala template, I still see the same message. I am requesting a message using the following code:
@Messages("login.page")
The above changes I made in accordance with the game guide: http://www.playframework.org/documentation/2.0/JavaI18N . Therefore, I have two questions:
- How can I set langauge by default and change it as in 1.2.4 (Lang.change ("en-GB"))
- How to access messages from Scala templates?
source share