Skip to content


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

MessageFormat Working Group

Welcome to the home page for the MessageFormat Working Group, a subgroup of the Unicode CLDR-TC.


The Message Format Working Group (MFWG) is tasked with developing an industry standard for the representation of localizable message strings to be a successor to ICU MessageFormat. MFWG will recommend how to remove redundancies, make the syntax more usable, and support more complex features, such as gender, inflections, and speech. MFWG will also consider the integration of the new standard with programming environments, including, but not limited to, ICU, DOM, and ECMAScript, and with localization platform interchange. The output of MFWG will be a specification for the new syntax.

MessageFormat 2 Technical Preview

The MessageFormat 2 specification is a new part of the LDML specification. This specification is initially released as a "Tech Preview", which means that the stability policy is not in effect and feedback from users and implementers might result in changes to the syntax, data model, functions, or other normative aspects of MessageFormat 2. Such changes are expected to be minor and, to the extent possible, to be compatible with what is defined in the Tech Preview.

The MFWG welcomes any and all feedback, including bugs reports, implementation reports, success stories, feature requests, requests for clarification, or anything that would be helpful in stabilizing the specification and promoting widespread adoption.

The MFWG specifically requests feedback on the following issues:

  • How best to define value resolution #678
  • How to perform non-integer exact number selection #675
  • Whether markup should support additional spaces #650
  • Whether "attribute-like" behavior is needed and what form it should take #642
  • Whether to relax constraints on complex message start #610
  • Whether omitting the * variant key should be permitted #603

What is MessageFormat 2?

Software needs to construct messages that incorporate various pieces of information. The complexities of the world's languages make this challenging. MessageFormat 2 defines the data model, syntax, processing, and conformance requirements for the next generation of dynamic messages. It is intended for adoption by programming languages, software libraries, and software localization tooling. It enables the integration of internationalization APIs (such as date or number formats), and grammatical matching (such as plurals or genders). It is extensible, allowing software developers to create formatting or message selection logic that add on to the core capabilities. Its data model provides a means of representing existing syntaxes, thus enabling gradual adoption by users of older formatting systems.

The goal is to allow developers and translators to create natural-sounding, grammatically-correct, user interfaces that can appear in any language and support the needs of diverse cultures.

MessageFormat 2 Specification and Syntax

The current specification starts here and may have changed since the publication of the Tech Preview version. The Tech Preview specification is here

The current draft syntax for defining messages can be found in spec/ The syntax is formally described in ABNF.

Messages can be simple strings:

Hello, world!

Messages can interpolate arguments:

Hello {$user}!

Messages can transform those arguments using formatting functions. Functions can optionally take options:

Today is {$date :datetime}
Today is {$date :datetime weekday=long}.

Messages can use a selector to choose between different variants, which correspond to the grammatical (or other) requirements of the language:

.match {$count :integer}
0   {{You have no notifications.}}
one {{You have {$count} notification.}}
*   {{You have {$count} notifications.}}

Messages can annotate arguments with formatting instructions or assign local values for use in the formatted message:

.input {$date :datetime weekday=long month=medium day=short}
.local $numPigs = {$pigs :integer}
{{On {$date} you had this many pigs: {$numPigs}}}

The message syntax supports using multiple selectors and other features to build complex messages. It is designed so that implementations can extend the set of functions or their options using the same syntax. Implementations may even support users creating their own functions.

See more examples and the formal definition of the grammar in spec/

Normative Changes during Tech Preview

The Working Group continues to address feedback and develop portions of the specification not completed for the LDML45 Tech Preview release. The main branch of this repository contains changes implemented since the technical preview.

Implementers should be aware of the following normative changes during the tech preview period. See the commit history after 2024-04-13 for a list of all commits (including non-normative changes).

  • #771 Remove inappropriate normative statement from
  • #767 Add a test schema and #778 validate tests against it
  • #775 Add a definition for variable
  • #774 Refactor error types, adding a Message Function Error type (and subtypes)
  • #769 Add :test:function, :test:select and :test:format functions for implementation testing
  • #743 Collapse all escape sequence rules into one (affects the ABNF)
  • more to be added as they are merged


  • Java:, part of ICU 75, is a tech preview implementation of the MessageFormat 2 syntax, together with a formatting API. See the ICU User Guide for examples and a quickstart guide.
  • C/C++: icu::message2::MessageFormatter, part of ICU 75, is a tech preview implementation of MessageFormat 2.
  • JavaScript: messageformat 4.0 implements the MessageFormat 2 syntax, together with a polyfill of the runtime API proposed for ECMA-402.

The working group is also aware of these implementations in progress or released, but has not evaluated them:

  • i18next i18nFormat plugin to use mf2 format with i18next, version 0.1.1


Tell us about your MessageFormat 2 implementation! Submit a PR on this page, file an issue, or send email to have your implementation appear here.

Sharing Feedback

Technical Preview Feedback: file an issue here

We invite feedback about the current syntax draft, as well as the real-life use-cases, requirements, tooling, runtime APIs, localization workflows, and other topics.


To join in:

  1. Review
  2. Apply to join our mailing list
  3. Watch this repository (use the "Watch" button in the upper right corner)

Copyright & Licenses

Copyright © 2019-2024 Unicode, Inc. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the United States and other countries.

The project is released under LICENSE.

A CLA is required to contribute to this project - please refer to the file (or start a Pull Request) for more information.