A simple gettext-like internationalization (aka i18n) library for Scala and Play Framework
APACHE-2.0 License
Have you ever wondered that there is no gettext-like library for Scala? Scalingua is here to fix it! It comes with lightweight runtime library and full-featured compile-time macros and SBT plugin that will combine the powers of gettext and Scala in a single library.
Scalingua consists of four modules:
core
— a minimal runtime components for internationalization. It's very lightweight (~ 30 kB) and provides basicscalingua
itself — library with macros that have these features:
msgctxt
) and plural strings;scalingua
library — you can include it in provided
scope and it will not break anything;*.pot
file every compilation run and keep this file up-to-date with during incremental compilation;th
interpolator that will translate HTML) or move I18n
method to your Utils
object, but in this case you will have dependency on scalingua
scalingua-sbt
— SBT plugin with small but important task:
*.po
files and compiles them to efficient binary files and Scala classes.scalingua-play
— Integration module for Play framework:
Messages
through DI;