Play Framework Internationalization Secure Social not working in production

54 views Asked by At

I am using Secure Social 2 with Play Framework 2.5.6 with a custom conf/messages file containing the language variables that is used in my application. All seems to be working 100% when running the project in development mode from IntelliJ using debug or run. However when I use activator stage or activator dist, the conf/messages file is ignored and it displays the default messages from secure social. What am I missing? Is there any additional configuration required to load the conf/messages file?

I have tried to create a conf/messages.en file and added the -Duser.language=en argument to the run command with no success.

My production.conf file has the following setting for languages:

play.i18n {
  langs = [ "en" ]
}

I am using the javax.inject.Inject annotation to inject the messagesApi and pass the messages to the scala template.

@Inject
MessagesApi messagesApi;

Messages messages = messagesApi.preferred(request());

Any help will be appreciated.

0

There are 0 answers