Showing posts with label Message Format Working Group. Show all posts
Showing posts with label Message Format Working Group. Show all posts

Friday, October 28, 2022

MessageFormat 2 Technical Preview Available

[image] The MessageFormat Working Group is pleased to announce that it has released a Technical Preview implementation of the current state of the MessageFormat 2 specification in ICU4J in the recent ICU 72 release. The Working Group has been working on a specification for a successor to ICU MessageFormat, which has been an industry staple for internationalized software for more than two decades.

Owing to the prevalence of MessageFormat not just as an API for software, but also given its syntax serving as a de facto serialization format for the localized messages sent to the API, the Working Group has put careful consideration into interchange and interoperability. Some goals of the new specification include promoting best practices for internationalization, including compatibility with localization industry supported XLIFF. Another goal includes a definition of the data model of the API input separate from the syntax to allow for multiple compliant syntaxes to be compatible. Similarly, the specification includes a registry of interfaces for dependent formatting functions, in order to cleanly separate implementation from specification, allowing users to specify custom formatting functions and plug in their own implementations.

MessageFormat 2 builds on top of the experience from using and maintaining ICU MessageFormat and a number of other localization systems and workflows. It improves the placeholder syntax, improves escaping rules inside the translatable content, replaces nested selectors with top-level multiple selectors, and allows the use of custom formatters.

For example:

match {$photoCount :number} {$userGender :equals}
when 1 masculine {{$userName} added a new photo to his album.}
when 1 feminine {{$userName} added a new photo to her album.}
when 1 * {{$userName} added a new photo to their album.}
when * masculine {{$userName} added {$photoCount} photos to his album.}
when * feminine {{$userName} added {$photoCount} photos to her album.}
when * * {{$userName} added {$photoCount} photos to their album.}

More examples and the formal definition of the grammar can be found in the specification draft.

We invite you all to try the Tech Preview available now in ICU4J and provide us any and all feedback. Similarly, please note that the MessageFormat 2 is still a work in progress, and therefore we rely on your questions, suggestions, and issues to critically inform how we iterate on the specification. Real world experience will allow us to address potential shortcomings in the ways that MessageFormat 2 will get used in practice.

For information about using the Tech Preview, refer to the API docs, ICU 72 download page, and the ICU4J User Guide.

To leave feedback about MessageFormat 2 (specification, syntax, etc.) or the Tech Preview implementation, please visit the working group’s repository at github.com/unicode-org/message-format-wg, where you can open a new Discussion topic or file a new Issue.


Over 144,000 characters are available for adoption to help the Unicode Consortium’s work on digitally disadvantaged languages

[badge]

Friday, January 10, 2020

New Unicode Working Group: Message Formatting

at time on date One of the challenges in adapting programs to work with different languages is message formatting. This is the process of formatting and inserting data values into messages in the user’s language. For example, “The package will arrive at {time} on {date}” could be translated into German as “Das Paket wird am {date} um {time} geliefert”, and the particular {time} and {date} variables would be automatically formatted for German, and inserted in the right places.

The Unicode Consortium has provided message formatting for some time via the ICU programming libraries and CLDR locale data repository. But until now we have not had a syntax for localizable message strings standardized by Unicode. Furthermore, the current ICU MessageFormat is relatively complex for existing operations, such as plural forms, and it does not scale well to other language properties, such as gender and inflections.

The Unicode CLDR Technical Committee is formalizing a new working group to develop a technical specification for message format that addresses these issues. That working group is called the Message Format Working Group and is chaired by Romulo Cintra from CaixaBank. Other participants currently represented are Amazon, Dropbox, Facebook, Google, IBM, Mozilla, OpenJSF, and Paypal.

For information on how to get involved, visit the working group’s GitHub page: https://github.com/unicode-org/message-format-wg

Open discussions will take place on GitHub, and written notes will be posted after every meeting.


Over 130,000 characters are available for adoption, to help the Unicode Consortium’s work on digitally disadvantaged languages.

[badge]