playlogo

I was having a strange issue with localization in a Play Framework application. I followed the simple steps detailed on the official documentation but with no luck.

When experimenting, I figured out that the locale used is the default locale of the JVM. In my case, my default locale is French so I only had French in my application. But on Heroku, the default locale is English and thus the application was only working in English.

The trick consists in adding an implicit lang to your template views. In fact, Scala import an implicit lang with the lowest priority being the one coming from the JVM, if you want to get the language parsed from the Accept-Languages http header, you need to add an implicit as below :

@(title: String)(content: Html)(implicit lang: Lang)

With this little trick, your calls to localization will use the locale extracted from the http request as expected.

Streamlining Finances: Automating Bill Renaming with Apple Shortcuts

## The Problem: The "Downloads" Folder ChaosWe all know the struggle. You download a PDF invoice from your utility provider or internet s...… Continue reading

Tuist build test schemes

Published on May 22, 2025

Swift module registration

Published on April 28, 2025