UNPKG

@progress/kendo-react-intl

Version:

React Internationalization package provides services for parsing and formatting of dates and numbers. KendoReact Internationalization package

36 lines (35 loc) 1.21 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use client"; import { IntlService as n } from "./Intl/IntlService.mjs"; import { LocalizationService as e } from "./Localization/LocalizationService.mjs"; import { GlobalizationContext as i } from "./globalization/GlobalizationContext.mjs"; function l(t) { if (!t && process.env.NODE_ENV !== "production") throw `Passed component - ${t} is invalid.`; const o = t.context; return o && o.intl ? o.intl : new n("en"); } function s(t) { if (!t && process.env.NODE_ENV !== "production") throw `Passed component - ${t} is invalid.`; const o = t.context; return o && o.localization ? o.localization : new e(); } function p(t) { t.contextType = i; } function v(t) { t.contextType = i; } export { l as provideIntlService, s as provideLocalizationService, p as registerForIntl, v as registerForLocalization };