@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.19 kB
JavaScript
/**
* @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 n from "prop-types";
import { LocalizationService as a } from "./LocalizationService.mjs";
import { GlobalizationContext as r } from "../globalization/GlobalizationContext.mjs";
const t = class t extends e.Component {
/**
* Returns a localization service. The method is suitable for overriding when you implement custom localization behavior.
*/
getLocalizationService() {
return new a(this.props.language);
}
/**
* @hidden
*/
render() {
return /* @__PURE__ */ e.createElement(r.Consumer, null, (i) => /* @__PURE__ */ e.createElement(r.Provider, { value: { ...i, localization: this.getLocalizationService() } }, this.props.children));
}
};
t.propTypes = {
language: n.string
};
let o = t;
export {
o as LocalizationProvider
};