0.7.0 • Published 2 months ago

@messageformat/icu-messageformat-1 v0.7.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 months ago

Compile ICU MessageFormat 1 sources into MessageFormat 2 formatters

This library provides compatibility for using ICU MessageFormat 1 sources with the Unicode MessageFormat 2.0 -based ECMA-402 Intl.MessageFormat proposal.

Usage

npm install @messageformat/icu-messageformat-1
import { mf1ToMessage } from '@messageformat/icu-messageformat-1';

const locale = 'en-US';
const msg = 'Today is {today, date}';

const mf = mf1ToMessage(msg, locale);

mf.format({ today: new Date('2022-02-02') });
// 'Today is Feb 2, 2022'

API

import {
  getMF1Functions,
  mf1ToMessage,
  mf1ToMessageData
} from '@messageformat/icu-messageformat-1';

For more information, see the API documentation site.

0.7.0

2 months ago

0.6.0

4 months ago

0.5.0

6 months ago

0.4.0

11 months ago

0.3.0

1 year ago

0.2.0

2 years ago

0.1.0

2 years ago