UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

22 lines (21 loc) 679 B
export type ICUFormatMessage = { isICU: (message: string) => boolean; format: (message: string, values: Record<string, unknown>, locale: string) => string | Array<unknown>; }; /** * ICU MessageFormat support for Eufemia translations. * * Pass this to the `messageFormatter` prop on `Provider` to enable * pluralization, select, selectordinal, and inline number/date/time * formatting in your translation strings. * * @example * import Provider from '\@dnb/eufemia/shared/Provider' * import { icu } from '\@dnb/eufemia/shared' * * <Provider messageFormatter={icu}> * <App /> * </Provider> */ export declare const icu: ICUFormatMessage; export default icu;