Skip to main content
https://badge.fury.io/py/elm-fluent.svg https://travis-ci.org/elm-fluent/elm-fluent.svg?branch=master https://codecov.io/gh/elm-fluent/elm-fluent/branch/master/graph/badge.svg Documentation Status

elm-fluent is an internationalization/localization solution for Elm.

It features:

  • A full implementation of Fluent - Mozilla’s brilliant next generation translation/internationalization/localization system.

  • A compiler approach that means you get excellent performance.

  • Proper support for the classic ‘plurals’ problem in i18n, along with other i18n issues.

  • Compile-time checking of every possible syntax or type error in your Fluent FTL files, by leveraging both Elm’s type system and our own checks.

  • Built-in ability to format numbers and dates according to locale, with ability to customize. This means strongly-typed messages and substitutions that help you avoid i18n issues you might not even know exist.

  • An elegant solution for the thorny problem of internationalizing messages that contain HTML fragments (such as bold text and hyperlinks), while also allowing such elements to work as normal in Elm’s event model (e.g. clickable links that send Elm messages).

  • Excellent, explicit compile-time error messages - inspired by the Elm compiler.

It combines the power of Fluent with Elm’s you-just-cant-break-it safety to give a very capable i18n solution.

Oveview

elm-fluent 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.

For discussion regarding Fluent, including elm-fluent, see also the Mozilla Discourse Fluent category.

Status

  • Stable - used in production.

  • A few rough edges - please see the list of open issues.

  • A pretty complete test suite, and a nice set of docs.

  • Compatibility: Elm 0.18 only.

    Elm 0.19 is problematic - we require a wrapper for Intl, but Elm doesn’t have one yet and the restriction on native modules blocks us from writing our own.

    It is unclear if/when an official wrapper will be provided, or whether it will be suitable for elm-fluent. We use elm-intl which has proved ideal for our usage, but the core team apparently quickly dismissed adoption of a library like that.

    In light of this, and other problems caused by the restriction on native modules in 0.19, the author of elm-fluent may well be forced to move away from Elm. In this event the most likely outcome is a migration to bucklescript with bucklescript-tea and elm-fluent will be forked to target that platform instead. This repo will not be deleted but further development will likely stop.

  • Free software: MIT license

Credits

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

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.8.0.tar.gz (123.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elm_fluent-0.8.0-py3-none-any.whl (48.8 kB view details)

Uploaded Python 3

File details

Details for the file elm_fluent-0.8.0.tar.gz.

File metadata

  • Download URL: elm_fluent-0.8.0.tar.gz
  • Upload date:
  • Size: 123.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.2","id":"zara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for elm_fluent-0.8.0.tar.gz
Algorithm Hash digest
SHA256 c5cfb7436cbef13c2543a07e528d2c1c34a236c1b7e2f41ad93ae86d7c301afb
MD5 af410607afc17cb28154957e6f356c17
BLAKE2b-256 2ce344494aa7f2a6c427d55990c2a286179f6e9c63bac46065b23d309ccadb53

See more details on using hashes here.

File details

Details for the file elm_fluent-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: elm_fluent-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 48.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.2","id":"zara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for elm_fluent-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b6711fba4fd1f475da948a6ed5e25745c3047790035339e9861c38c8f27525c
MD5 7b4d798e5106892b5b10dcea1357025a
BLAKE2b-256 0c1699cdc3dd548298125e3e521173a6a70676ea5b7304e7cebba678e17aa6c7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page