Skip to main content

Fluent i18n solution for Elm

Project description

elm-fluent

https://img.shields.io/pypi/v/elm_fluent.svg https://img.shields.io/travis/elm-fluent/elm-fluent.svg Documentation Status

elm-fluent is a Fluent implementation for Elm.

Fluent is a next-generation translation/localization solution, designed by the folks at Mozilla, based on many years of experience with localizing into a large number of different languages. Mozilla have extracted parts of their ‘l20n’ solution (used by apps like Firefox and Thunderbird) into a re-usable specification designed specifically for the web.

elm-fluent is a full implementation of this specification for Elm. It operates as a command line tool that compiles .ftl files to .elm files. The result is that each message becomes a function that will generate a translated string (or HTML fragment) for a given locale and an optional set of strongly typed parameters (string, dates or numbers).

Dates and numbers can also be passed with formatting parameters supplied - for example, to attach a currency to a number, so that it can be correctly formatted as a currency according to the rules of the locale in use.

Please see the docs for more information.

Status

  • Rough around the edges, but usable. Please see the list of open issues.

  • A pretty complete test suite.

  • Compatibility: Elm 0.18 only at the moment.

  • Free software: MIT license

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.2.0 (2018-09-10)

  • Better handling for a large variety of error conditions

  • Proper fallback mechanism implemented

  • Added --watch option.

  • Eliminate unused imports from generated code

  • Various bug fixes: * Avoid outputting .elm files with no exports * Bugs with HTML attributes and non-string message args * Crasher with multi-line messages * Crasher when a message is missing from default locale

0.1.0 (2018-07-27)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elm_fluent-0.2.0.tar.gz (113.7 kB view hashes)

Uploaded Source

Built Distribution

elm_fluent-0.2.0-py2.py3-none-any.whl (42.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page