Socket
Socket
Sign inDemoInstall

ru.makkarpov:scalingua_2.13.0-M5

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ru.makkarpov:scalingua_2.13.0-M5

A simple gettext-like internationalization library for Scala


Version published
Maintainers
1
Source

Scalingua Build Status Latest version Join the chat at https://gitter.im/makkarpov/scalingua

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 basic functions like loading precompiled translations.
  • scalingua itself — library with macros that have these features:
    • String interpolator that makes internationalization of strings as easy as writing one letter before them;
    • Plural string interpolator that adds plural suffixes for you;
    • Macros for strings with contexts (msgctxt) and plural strings;
    • Macros leaves no dependency on scalingua library — you can include it in provided scope and it will not break anything;
    • Macros will extract all your strings to separate *.pot file every compilation run and keep this file up-to-date with during incremental compilation;
    • You can translate more complex formats like HTML — all placeholders will be escaped, so no XSS attacks are possible;
    • You can re-use existing macros from this library to implement custom translation utilities (e.g. create 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:
    • Automatically sets compiler parameters so you don't have to remember them;
    • Parses *.po files and compiles them to efficient binary files and Scala classes.
  • scalingua-play — Integration module for Play framework:
    • Dependency injection bindings to summon Messages through DI;
    • HTML output format with ready to use functions and interpolators;
    • Extraction of visitor language from request headers.

Getting started

FAQs

Package last updated on 06 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc