Awesome
<div class="main-title"> <img align="right" width="100" height="100" src="https://messageformat.github.io/messageformat/logo/messageformat.svg"> <h1>messageformat</h1> </div>The experience and subtlety of your program's text can be important. Messageformat is a mechanism for handling both pluralization and gender in your applications. It can also lead to much better translations, as it's designed to support all the languages included in the Unicode CLDR.
This monorepo provides packages supporting JS implementations of both ICU MessageFormat (MF1) and Unicode MessageFormat 2 (MF2):
ICU MessageFormat 1 Packages
- @messageformat/cli - A command-line client for the library
- @messageformat/convert - Converts other localization formats into ICU MessageFormat
- @messageformat/core - The core library that transpiles MessageFormat strings into JavaScript functions
- @messageformat/date-skeleton - Tools for working with ICU DateFormat skeletons
- @messageformat/loader - Webpack loader for JSON, YAML, & .properties message files
- @messageformat/number-skeleton - Tools for working with ICU NumberFormat skeletons
- @messageformat/parser - Parses MessageFormat source strings into an AST
- @messageformat/react - React hooks and other bindings for messages
- @messageformat/runtime - Runtime dependencies of compiled message modules
- rollup-plugin-messageformat - Rollup plugin for JSON, YAML, & .properties message files
Unicode MessageFormat 2 Packages
- messageformat - (BETA) Intl.MessageFormat / MF2 parser, runtime and polyfill
- @messageformat/fluent - (BETA) Compile Fluent sources into MF2 resources
- @messageformat/icu-messageformat-1 - (BETA) Compile MF1 sources into MF2 formatters
Getting Started (MF1)
Depending on your situation, consult one or more of the following guides:
Alternatively, take a look at our examples or dig into the API documentation if you're looking to do something more involved.
Our Format Guide will help with the ICU MessageFormat Syntax, and the Usage Guide provides some further options for integrating messageformat to be a part of your workflow around UI texts and translations.
Messageformat is an OpenJS Foundation project, and we follow its Code of Conduct.
<a href="https://openjsf.org"> <img width=200 alt="OpenJS Foundation" src="https://messageformat.github.io/messageformat/logo/openjsf.svg" /> </a>