Pergunta

I have created a subpackage of views in order to customize the default look of securesocial's templates. (I have used https://github.com/ngarera/securesocial-custom-views-sample as an example and basically copied the relevant files)

There are two i18n-files (messages.en, messages.de) in my /conf folder. Viewing the main page confirms that the messages.en is correctly used.

However, when calling /login (and therefore displaying the custom template), no messages-key is correctly looked up - instead only the key itself (e.g. "auth.login") is displayed, when really it should show "Login".

I have seen a similar request at Stackoverflow (How to change text in SecureSocial) where it was stated to remove the .en file extension. Doing that will show the correct Message...but creating one messages file is not really the point of internationalization...

I have confirmed that my browser sends the correct language (http://www.mybrowserinfo.com/detail.asp?bhcp=1) so messages.de should work...(which it does when I open a self-made controller - only the custom-securesocial-view is not working...)

Does anybody have similar problems? And why does the localization work for securesocial's messages?

Regards, David

PS: using Play 2.1.3, Java

Foi útil?

Solução

There were some issues in the SecureSocial code that prevented i18n from working properly.

This has been fixed and is currently available in the master-SNAPSHOT version because a stable version with those changes has not been released yet.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top