UNPKG

@progress/kendo-react-intl

Version:

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

34 lines (33 loc) 1.15 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 * as e from "react"; import i from "prop-types"; import { IntlService as l } from "./IntlService.mjs"; import { GlobalizationContext as r } from "../globalization/GlobalizationContext.mjs"; const t = class t extends e.Component { /** * Returns an internationalization service. The method is suitable for overriding when you implement custom internationalization behavior. */ getIntlService() { return new l(this.props.locale); } /** * @hidden */ render() { return /* @__PURE__ */ e.createElement(r.Consumer, null, (n) => /* @__PURE__ */ e.createElement(r.Provider, { value: { ...n, intl: this.getIntlService() } }, this.props.children)); } }; t.propTypes = { locale: i.string }; let o = t; export { o as IntlProvider };