react-intl
Version:
Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.
37 lines (35 loc) • 1.43 kB
text/typescript
/*
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
export * from './types';
export {default as defineMessages} from './define-messages';
import {
createFormattedComponent,
createFormattedDateTimePartsComponent,
} from './components/createFormattedComponent';
export {
default as injectIntl,
Provider as RawIntlProvider,
Context as IntlContext,
WithIntlProps,
WrappedComponentProps,
} from './components/injectIntl';
export {default as useIntl} from './components/useIntl';
export {default as IntlProvider, createIntl} from './components/provider';
export const FormattedDate = createFormattedComponent('formatDate');
export const FormattedTime = createFormattedComponent('formatTime');
export const FormattedNumber = createFormattedComponent('formatNumber');
export const FormattedDateParts = createFormattedDateTimePartsComponent(
'formatDate'
);
export const FormattedTimeParts = createFormattedDateTimePartsComponent(
'formatTime'
);
export {FormattedNumberParts} from './components/createFormattedComponent';
export {default as FormattedRelativeTime} from './components/relative';
export {default as FormattedPlural} from './components/plural';
export {default as FormattedMessage} from './components/message';
export {default as FormattedHTMLMessage} from './components/html-message';
export {createIntlCache} from './utils';