- Handles arbitrary nesting of pluralization and select rules
- Supports all ~500 languages included in the Unicode CLDR
- Works on the server and the client
- Remarkably useful even for single-language use
- Compatible with other MessageFormat implementations
- Extendable with custom formatting functions
- Very whitespace tolerant
- Supports Unicode, including RTL and mixed LTR/RTL strings
The project currently provides the following npm packages, all hosted under the messageformat GitHub org:
- @messageformat/cli - A command-line client for the library
- @messageformat/convert - Converts other localization formats into MessageFormat
- @messageformat/date-skeleton - Tools for working with ICU DateFormat skeletons
- @messageformat/loader - Webpack loader for 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
- gettext-to-messageformat - Converts gettext input files to ICU MessageFormat
- messageformat-po-loader - Webpack loader for messages in gettext files
- messageformat-properties-loader - Webpack loader for messages in Java .properties files
- rollup-plugin-messageformat - Rollup plugin for message files
Previous versions of the packages under the
@messageformat npm org were published with names that used
messageformat- as a prefix.
You may use this software under the MIT License:
Copyright OpenJS Foundation and contributors, https://openjsf.org/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
We require all code contributions to be covered under the OpenJS Foundation’s Contributor License Agreement. This can be done electronically and essentially ensures that you are making it clear that your contributions are your contributions and that you have the legal right to contribute them under our MIT license. If you’ve not previously signed the CLA, our bot will provide you with instructions for how to do so.
See CONTRIBUTING.md in the main repo for more details.